<pre> (was: Re: Classic ascii pics)
From Markus Gebhard <ukg...@rz.uni-karlsruhe.de>
· alt.ascii-art
· 31 Mar 2001 10:59 · View full thread
Ok there has been lots of discussion and now I did some testing and here are the results: The problem was that on http://www.bbc.co.uk/h2g2/guide/A525791 the html-tag <PRE> did not work to make the ascii art appear in a monospaced font in any browser. At first I compared the page source to the one I use on my own site and found that I always have used <code><pre>. It has worked well in any browser I have seen, but it is not correct as claimed in the html standard: Now, Eli the Bearded wrote: > RFC 1866 Hypertext Markup Language - 2.0 November 1995 > > 5.5.2. Preformatted Text: PRE > > The <PRE> element represents a character cell block of text and is > suitable for text that has been formatted for a monospaced font. > > The <PRE> tag may be used with the optional WIDTH attribute. The > WIDTH attribute specifies the maximum number of characters for a line > and allows the HTML user agent to select a suitable font and > indentation. I have downloaded A525791 and modified the source code to find out why pre does not work there. I have to say: The code is ugly as hell. And after a while I found the problem: I do not know what editor created this web page, but it does not care much about nesting <font> tags (there are 55!) in a sensible way. The pre-block is inside at least one <font face="Arial,...> block. This direction makes Netscape ignore the monospaced rule for the <pre>-tag. If you close all <font>-statements before <pre> it seems to work fine in every browser. So I apologize for claiming <code><pre> was the right way to insert ascii art into html and I will remove the <code>-tags from my pages. BTW: <font size="+1"> may does not seem to be allowed inside <pre>, but it seems to work. Markus PS: I recommend using the w3c html validator to check your html for correctness: http://validator.w3.org/ It lists about more than 100 errors for the document above.
Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,a8ba68671c5b36fe,start X-Google-Attributes: gidf996b,public X-Google-ArrivalTime: 2001-03-31 03:00:03 PST Path: supernews.google.com!sn-xit-03!supernews.com!newsswitch.lcs.mit.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.stealth.net!news.uni-stuttgart.de!rz.uni-karlsruhe.de!news.rz.uni-karlsruhe.de!not-for-mail From: Markus Gebhard <ukg...@rz.uni-karlsruhe.de> Newsgroups: alt.ascii-art Subject: <pre> (was: Re: Classic ascii pics) Date: Sat, 31 Mar 2001 12:59:54 +0200 Organization: University of Karlsruhe, Germany Lines: 49 Message-ID: <3AC...@rz.uni-karlsruhe.de> NNTP-Posting-Host: wn4-jarjar.wn4.uni-karlsruhe.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.rz.uni-karlsruhe.de 986036346 24169 172.20.12.141 X-Complaints-To: use...@rz.uni-karlsruhe.de X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en Xref: supernews.google.com alt.ascii-art:5040
About this message.
This message was posted publicly to the newsgroup
alt.ascii-art
in 2001 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.