Re: XHTML 2.0 considered harmful

On Wed, 15 Jan 2003, Daniel Glazman wrote:
> 
> I think that <br/> cannot be replaced by <l>. Read the following
> 
> http://daniel.glazman.free.fr/weblog/archived/2003_01_12_glazblogarc.html#87473606

The document gives this example:

   <p>Combien sont ces six saucissions-ci? Ces six saucissons-ci
   sont six sous.<br/>Si ces six saucissons-ci sont six sous c'est
   six sous trop cher!</p>

This example is a good example of abuse of the <br> element. Semantically,
that line break has no place in the markup. If the reason for it is to
indicate a paragraph break, then opening a new paragraph would be more
appropriate:

   <p>Combien sont ces six saucissions-ci? Ces six saucissons-ci
   sont six sous.</p>
   <p>Si ces six saucissons-ci sont six sous c'est six sous trop
   cher!</p>

Alternatively, if the intent is to indicate a thematic break, then the
<span> element would be more appropriate:

   <p><span>Combien sont ces six saucissions-ci? Ces six saucissons-ci
   sont six sous.</spn> <span>Si ces six saucissons-ci sont six sous
   c'est six sous trop cher!</span></p>

   span::after { content: '\A' }

The key giveaway explaining why the <br> element in this document is
inappropriate is that if you were reading out the document, you
wouldn't say a line break. Therefore it is purely visual and has no
place in the document markup as is.

On the other hand, valid uses for <br> all map directly into uses of
the <l>...</l> element:

   Poems <br/>                 <l> Poems </l>
   Mapping the break <br/>     <l> Mapping the break </l>
   And hymns <br/>             <l> And hymns </l>
   Into a steak <br/>          <l> Into a steak </l>

   5, Avenue Road <br/>        <l> 5, Avenue Road </l>
   The City <br/>              <l> The City </l>
   The State <br/>             <l> The State </l>
   The Country <br/>           <l> The Country </l>

Your second point is that <br/> is easier to edit in a WYSIWYG editor.
However this is a red herring since in practice you have already
solved the problem: You handle a backspace exactly in the way you
would handle a backspace over through a <div> element. After all,
stylistically, an <l> element is identical to a <div> element: it is
simply an element with 'display' set to 'block'.

Your third conclusion is one of esthetics and education. Personally I
find it much easier to think of a line than a line break, and I think
<l>...</l> is prettier than <br/>. But these are inconsequential
concerns given the much more important considerations.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 15 January 2003 09:06:00 UTC