lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV CENTER in PRE


From: Greg Marr
Subject: Re: LYNX-DEV CENTER in PRE
Date: Fri, 27 Feb 1998 09:13:08 -0500

At 10:29 PM 2/26/98 -0500, PW wrote:
>the point originally raised in this thread should not be overlooked:
>apparently Lynx does not restore  <pre>  behaviour after  </center> ,
>which is clearly a bug & should be corrected.

According to the HTML specs, 

<PRE>
Text line number one.
<CENTER>
Text line number two.
</CENTER>
Text line number three.
</PRE>

is not valid, since <CENTER> really means <DIV ALIGN=CENTER>, and <DIV>
isn't allowed inside <PRE>.  This is a nonconforming document, and any
rendering of it comes under error recovery.  

Assuming that any block-level element open tag implicitly ends any
preceding element that can't contain a block level element, and that all
text must be inside a block level element (not DIV), the previous example
is equivalent to:

<PRE>
Text line number one.
</PRE>
<DIV ALIGN=CENTER>
<P>
Text line number two.
</P>
</DIV>
<P>
Text line number three.

followed by an invalid end tag.

Thus, "Text line number one" should be preformatted text.  "Text line
number two" should be normal text, centered, and "Text line number three"
should be normal text in the default alignment.

--
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]