Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 19 Apr 1998.
Re: The <PLAINTEXT> HTML tag: Good for ASCIIArt?

Re: The <PLAINTEXT> HTML tag: Good for ASCIIArt?

Martin Atkins (zne...@ovtsbbg.pbz) wrote:
: I agree that <code> is for code, but surely it should render like
: <pre> so that the indents and the like remain?

No, not really. If you wanted to be pedantic, the correct markup
would be:

<PRE><CODE>
#include &lt;stdio.h&gt;

void main( void )
{
  printf( "Hello World!\n" );
}
</CODE><PRE>

However, this is what the HTML 2.0 specification says: (The later ones
say much the same thing.)

   The CODE element indicates an example of code, typically rendered
   in a mono-spaced font. The CODE element is intended for short words
   or phrases of code; the PRE block structuring element (section
   Preformatted Text: PRE) is more appropriate for multiple-line
   listings. For example:

   <P>The expression <CODE>x += y</CODE> is shorthand for <CODE>x = x
   + y</CODE></P>

And this is from the CSS implementation of the default rendering of
HTML 2.0:

  H1, H2, H3, H4, H5, H6, P, UL, OL, DIR, MENU, DIV,
  DT, DD, ADDRESS, BLOCKQUOTE, PRE, BR, HR { display: block }

  B, STRONG, I, EM, CITE, VAR, TT, CODE, KBD, SAMP,
  IMG, SPAN { display: inline }

 [snip]

  PRE, TT, CODE, KBD, SAMP { font-family: monospace }

  PRE { white-space: pre }

And since I was digging around the old DTDs anyway, I thought I'd find
some info about <PLAINTEXT>. I found out that HTML 2.0 defines it as
a _deprecated_ element, and absolutely refuses to describe it outside
of the SGML declaration.

It turns out that its content model is indeed defined as CDATA, which
means that everything between it and the first </PLAINTEXT> is treated
literally. The same definition is given for <XMP> and <LISTING>, which
are described in the document and are already considered deprecated in
favor of <PRE>.

However, it seems that the original (HTML 1.0) definition was probably
different, in that _everything_ after <PLAINTEXT> was treated literally
until the end of the document. I couldn't find a copy of HTML 1.0 to
verify this, but I did find this piece of a message at
http://www.acl.lanl.gov/HTML_WG/html-wg-95q2.messages/0020.html

   a) HTML 2.0 is a definition of existing practice in mid-1994 and
   b) HTML UA's accepted and processed XMP, LISTING and PLAINTEXT at
   that date, and
   c) These constructs, (PLAINTEXT in particular) are not SGML compliant,
   and
   d) These constructs were in the HTML 1.0 specifications, and

Oh, and one more funny thing about <PLAINTEXT>. Apparently HTML 2.0
does _not_ define it as a block-level element (inside <BODY>) like
<PRE> (and <XMP> and <LISTING>) but as a special part of a document
_outside_ <HEAD> and <BODY>, much like <FRAMESET> in later standards.

So, why all this? I think the reason was HTTP 0.9, a very primitive
protocol which did not support "Content-Type:" (or any headers at all
for that matter). So everything retrieved over HTTP 0.9 was assumed to
be HTML, and if you wanted to put plain text on the web in those days
you had to stick <PLAINTEXT> on the first line.

-- 
 .    _, .. j u s t.  h o w l.i n g   i n  .t h e   n.i g h t .. ._,   .
,    )''        .       /\_    .     '     ,/\   .          ,    ``(  ,
_\__/ |__.'\._______,--;_'_`-.___,.______,/_,_`.__,-.__'__,/`-._,_| \____
 ,_f_)\. Ilmari Karonen  ilt...@sci.fi  http://www.sci.fi/~iltzu/  /(_|_,.

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f996b,5c847fda093d87ec
X-Google-Attributes: gidf996b,public
From: ilt...@sci.fi (Ilmari Karonen)
Subject: Re: The <PLAINTEXT> HTML tag: Good for ASCIIArt?
Date: 1998/04/19
Message-ID: <6hdgu7$opg$1...@tron.sci.fi>#1/1
X-Deja-AN: 345710134
Distribution: world
References: <353...@news.vossnet.net> <6h09up$o26$1...@nnrp1.dejanews.com> <6h2718$eja$2...@tron.sci.fi> <353...@news.vossnet.net>
Organization: (dis)Order of the Holy Spoon (or whatever)
Newsgroups: alt.ascii-art
About this message. This message was posted publicly to the newsgroup alt.ascii-art in 1998 and is mirrored here unchanged as part of the Historic Archives – only email addresses are masked. The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can. Are you the author? Contact us to get your posts attributed, connected to your artist profile, or removed.

Report this message

Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.

Help classify this post