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: Philip Webb
Subject: Re: lynx-dev <center> inserts <p>
Date: Thu, 17 Sep 1998 11:13:45 -0400 (EDT)

980917 Greg Marr wrote: 
> According to HTML specs, <CENTER> is shorthand for <DIV ALIGN="CENTER">.

yes: HTML 4.0 says they are "exactly equivalent" & deprecates  <centre> .
 
> Thus

>> <HTML>
>> <HEAD><TITLE>Test page: centring & line spacing</TITLE></HEAD>
>> <BODY>
>> <center>line 1</center>
>> <center>line 2</center>
>> end of test
>> </BODY></HTML>
> 
> is really
> 
>> <HTML>
>> <HEAD><TITLE>Test page: centring & line spacing</TITLE></HEAD>
>> <BODY>
>> <DIV ALIGN=center><P>line 1</P></DIV>
>> <DIV ALIGN=center><P>line 2</P></DIV>
>> <P>end of test</P>
>> </BODY></HTML>

no: there's nothing in HTML 4.0 to insert your  <P> ... </P>
(which makes no difference to how Lynx renders it anyway).  Lynx renders

<HTML>
<HEAD><TITLE>Test page: hyphenation</TITLE></HEAD>
<BODY>
start of test
<div align=center>line 1</div>
<div align=center>line 2</div>
end of test
</BODY></HTML>

as

   start of test
   
                                   line 1
                                      
                                   line 2
                                      
   end of test

> So, lynx is rendering this correctly.

no: HTML 4.0 (7.5.3) says:

"Generally, block-level elements begin on new lines.
Block-level elements will close an unterminated paragraph element"

that's "on new lines", not "following a blank line".
Lynx is not following HTML 4.0 in surrounding  <div>'s  with blank lines,
as if  <div>  were equivalent to  <p> , which it is not.

(7.5.4) gives the following example:
  
   Visual user agents generally place a line break
   before and after DIV elements, for instance:
   
<P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>ccccc<P>ccccc</DIV>

   This is typically rendered as:
   
aaaaaaaaa
bbbbbbbbb
ccccc

ccccc

   Your user agent renders this as follows:
   
   aaaaaaaaa
   bbbbbbbbbccccc
   
   ccccc

both renderings place the  <div>'s  on consecutive lines
& may ignore  </div><div>  altogether.

am i missing something in the specs?  if not, 2-8-2 should correct this.
   
-- 
========================,,============================================
SUPPORT     ___________//___,  Philip Webb : address@hidden
ELECTRIC   /] [] [] [] [] []|  Centre for Urban & Community Studies
TRANSIT    `-O----------O---'  University of Toronto

reply via email to

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