[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lynx-dev Vlad's: <PRE>, formatting, screen width
From: |
David Woolley |
Subject: |
Re: lynx-dev Vlad's: <PRE>, formatting, screen width |
Date: |
Tue, 9 Mar 1999 00:30:27 +0000 (GMT) |
> > It seems that it will be useful to allow lynx to interpret tags
> > inside <PRE> block preserving the layout of the source in <pre>.
Mimicing error recovery and "undefined" behavour is dangerous, it
leads other authors to presume the same behaviour on invalid input.
> > This is supported by at least Netscape (even <HTML>,<HEAD>,<BODY>
> > are not required for NS) and kfm ( <HTML>,<HEAD>,<BODY> tags are required
> > for document to be parsed as HTML even for file with .html extension).
.html is irrelevant, the only valid indicator of HTML over an HTTP
connection is a text/html media type (maybe also application/html).
N.B. IE4's detection of HTML by <html> in the absence of a correct
media type is broken.
<html>, <head> and <body> tags are optional, according to the DTD, so,
if Lynx is failing to parse HTML with a correct media type, but omitting
these, it is broken. NB. <title> is not optional, at least for HTML
4.0. Lynx 2.7.2 correctly recognizes B and I without any of html,
head or body, or even title. NB this is only valid for valid HTML 2.0;
later version require doctype to be valid, although I'd expect Lynx to
parse them without this.
> > Both of them allow tags like <b>,<i> and even <a>.
I incorrectly stated that <b> and <i> are forbidden in <pre>. The
full list of forbidden elements, for HTML 4 transitional is:
IMG, OBJECT, APPLET, BIG, SMALL, SUB, SUP, FONT, BASEFONT.
The list for HTML 4 strict is shorter, because some of these elements
are absolutely forbidden.
I have never doubted that A is allowed in PRE.
> > This feature allows quick pseudo-html-formatting of the pure-text
> > documents
The only violation is the absence of a title element.
> > for which no hypertext source in any form isn't availble by inserting tags
> > like <b>,<i> around chapter titles, etc using 'sed'. Currently default
Chapter titles should *always* use Hn; that way formatters can construct
tables of contents (e.g. Amaya and html2ps). (html2ps (plus distiller
or ghostscript) will even construct a PDF outline from them.)