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

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

From: Vlad Harchev <hvv@hippo.ru>
Date: Thu, 2 Sep 1999 03:18:52 +0500 (SAMST)
To: html-tidy@w3.org
Message-ID: <Pine.LNX.4.10.9909020315590.1645-100000@localhost.localdomain>
On Wed, 1 Sep 1999, Larry W. Virden wrote:

 Hello, Larry!

 The <code> tag is designed only to select text style reasonable for
displaying "machine code" (it's like <strong>,<em> - no special treatment of
content). You should use <pre> and use named enities like &lt; for your
example.

> 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:
> 
> 
> <html>
> <head>
> <title>test code</title>
> </head>
> <body>
> <code>
> #include <stdio.h>
> int main(int argc, char **argv)
> {
> 	fprintf(stdout, "Hello, world (%s)\n", argv[1]);
> 	return 0;
> }
> </code>
> </body>
> </html>

 Best regards,
 -Vlad
Received on Wednesday, 1 September 1999 08:23:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:42 GMT