There are sure manyways to get html from other files to use in a CGI program, but when you want to build a single-file software, how big it gets with the HTML inside?
My programs grow like from 4, 5K to 100, 200K, and I keep making things to make HTML occupy less bytes and less lines too. So my html codes have a lot of \n and \t in the program and you realy can't understand what's in there, but when you open a source code in the browser it looks perfect...