W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 1999

Displaying source code - is this a tidy or an html issue?

From: Larry W. Virden <lvirden@cas.org>
Date: Wed, 1 Sep 1999 07:25:08 -0400 (EDT)
Message-Id: <9909010725.AA6288@cas.org>
To: html-tidy@w3.org
If I have a web page on which I wish to display source code, I thought
that all I needed to do was include the code thusly:

<title>test code</title>
#include <stdio.h>
int main(int argc, char **argv)
	fprintf(stdout, "Hello, world (%s)\n", argv[1]);
	return 0;

However, tidy complains about the above by saying:

Tidy (vers 26th July 1999) Parsing "stdin"
line 7 column 11 - Error: <stdio.h> is not recognized!
line 7 column 11 - Warning: discarding unexpected <stdio.h>

"stdin" appears to be HTML 2.0
2 warnings/errors were found!

This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.

HTML & CSS specifications are available from http://www.w3.org/
To learn more about Tidy see http://www.w3.org/People/Raggett/tidy/
Please send bug reports to Dave Raggett care of <html-tidy@w3.org>
Lobby your company to join W3C, see http://www.w3.org/Consortium

Is there a different HTML tag I must use so that I can include arbitrary
source code without modifications?
Larry W. Virden                 <URL: mailto:lvirden@cas.org>
<URL: http://www.purl.org/NET/lvirden/> <*> O- Save us from the snobs.
Unless explicitly stated to the contrary, nothing in this posting should 
be construed as representing my employer's opinions.
Received on Wednesday, 1 September 1999 07:25:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:46 UTC