Code to HTML This utility is for converting program code (e.g. C or HTML) in a textfile to a HTML document. This panel initially appears as follows:
Programming languages such as C use characters which require special HTML codes in order to be displayed correctly, including:
Also, if one wishes to display HTML code within an HTML document, these characters must be converted to their corresponding codes. It is thus not sufficient, when displaying program code in an HTML document, to enclose it in <PRE>...</PRE>.
< > " & < > " & Code to HTML automates most of the tasks involved in converting program code to a decent-looking HTML document. Sometimes some editing will be required to get the HTML document into its final form (e.g., splitting long lines into two or more lines), but this tool should be able to do most of the work.
The file containing the program code to be converted, and the file to contain the resulting HTML code, are specified in the usual way (as explained in Text to HTML and in HTML Template).
The converted program code is placed between a standard header and footer as follows:
<html> <head> <title>program_source_code_filename</title> <meta name="ROBOTS" content="NOINDEX"> </head> <body bgcolor="#FFFFFF" text="#000000"> <pre> Converted program source code goes here. </pre> </body> </html>This is what the HTML source for this document looks like when viewed with a web browser.
Easy HTML Construction Kit Home Page