I'm not asking so much for a templating language as just having all the HTML and CSS in one place.  Where the code currently has HTML fragments all over the place, I'm advocating keeping the HTML in a single <em>documented</em> resource file (perhaps just a C file with a bunch of named string variables or a hash map with well-known key names) so that it's easier to find the snippets and edit them as needed.