Template2doc (Template to Document) is a set of string routines that simplifies the task of generating html pages. Instead of having all html sources stored in C-programs the html sources is stored as a html template document (file). This template document, which is a regular standard html document, contains specific keywords that tells the routines where to insert the produced data. Template2doc contains routines both for simple replacement of words as well as sophisticated insertion of table data. Although the template definition syntax is very simple, it contains the most essential functionality requirements. Of course, Template2doc works on any text document. However, it is specific designed and written for html documents in mind.