lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev <center> inserts <p>


From: Greg Marr
Subject: Re: lynx-dev <center> inserts <p>
Date: Thu, 17 Sep 1998 15:36:31 -0400

At 02:57 PM 9/17/98 -0400, you wrote:
>980917 Greg Marr wrote: 
>> The content of BODY is %block% (I checked this time) and as such can not
>> contain text.  Therefore, a paragraph start tag is inferred before the
text.
> 
>now you've lost me: BODY is what HTML 4.0 describes as the "canvas"
>on which the document is painted by the browser: it must contain text.

BODY can only contain block level elements.  Any text must be inside another
block level element that can contain text.

7.5.1: <!ELEMENT BODY O O (%block;|SCRIPT)+ 

This means that the BODY element has start and end tags that can be omitted,
and its content is one or more of %block; or SCRIPT.  %block; is defined as

<!ENTITY % block "P | %heading; | %list; | %preformatted; | DL | DIV |
NOSCRIPT
| BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
<!ENTITY % list "UL | OL">
<!ENTITY % preformatted "PRE">

The only things BODY can contain directly are those 19 elements.

If body contains anything else, the document is invalid, and error recovery
kicks in.  Generally, when text is found where only a block level element is
allowed, the text is placed inside a P element.  Of course, since this is
error
recovery, anything goes.

>further, what do you say about the examples i quoted from 7.5.3-4 ?
>there is clearly no  <P>  inferred before/after the  <DIV>'s  there.

There is no text found in the body of the document.  All text is inside a P or
a DIV, thus it is a valid document, and no error recovery is necessary.

--
Greg Marr
address@hidden
"We thought you were dead." 
"I was, but I'm better now." - Sheridan, "The Summoning"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]