Re: br element should be eliminated

Hello Liorean,
Monday, September 23, 2002, 3:18:42 PM, you wrote:

> <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam
> (etc.)
> euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>

> This example would (with the formatting common in most novels and other
> long texts) format like this:

> Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam nonumy
> (etc.)
> nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

I would write your example as follows:

[begin example source]
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet.</p>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet.</p>
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet.</p>
<p class="stb">Duis autem vel eum iriure dolor in hendrerit in
vulputate velit esse molestie consequat, vel illum dolore eu feugiat
nulla facilisis at vero eros et accumsan et iusto odio dignissim qui
blandit praesent luptatum zzril delenit augue duis dolore te feugait
nulla facilisi.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.</p>
[end example source]

(Or similar.) With the following CSS:

p,.stb{text-indent:0;margin-top:1em}
p+p{text-indent:1em}

To produce the following (assuming the CSS is applied):

[begin example rendering]
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet.
  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet.
  Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea
rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
molestie consequat, vel illum dolore eu feugiat nulla facilisis at
vero eros et accumsan et iusto odio dignissim qui blandit praesent
luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
  Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat
volutpat.
[end example rendering]

Which could be identical to your rendering, with the advantages that
presentation is not embedded (it's in the CSS) and paragraphs are
marked up properly. The "stb" class is short for "small thematic
break." Bert Bos describes this technique on the W3C's site, but I
first read about it from Todd Fahrner, I think. Here's the W3C link:

http://www.w3.org/Style/Examples/007/indent.html

Without the CSS applied, the reader will get plain paragraphs. This is
okay since the margin and indentions, while helpful, are not vital to
understanding the paragraphs' content.

> Now, a short breakdown of what positive and negative sides I see in the two
> tag types:

I'll address this point by point (as best I can).

> br:
> + Space efficient
I'm not sure this is vital. However, if it is, couldn't we use l
instead of line? It would still be bigger, but much closer in size.

> + Simple
I'm not convinced that br is significantly simpler than line. I
believe line is simpler than br, and more importantly, line is
intuitive and br is not. On the one hand, after years of use br still
doesn't seem right to me. On the other hand, line is easily understood
and I've never used it before.

> + Corresponds more to the pure text syntactical system, allowing easier
> translation to and from pure text (also related to second negative)
As demonstrated above, I believe line fills the role and br does not.
br was alright for poems and addresses (I like line more of course),
but I think the use of br instead of proper markup is not something
the W3C wants to perpetuate.

> - Is hard to style
Agreed!

> - Is hard to define what semantic category it belongs in (should really be
> an entity if I had it my way)
I'm still trying to wrap my head around that one. :)

> - Is frequently being abused (it's used to create new lines, not separate
> paragraphs)
Agreed.

> - Does not give you the possibility to style each context setting
I'm don't quite understand this idea of context setting, but I get the
feeling it would be better accomplished with classed paragraphs or
section elements than with anything else (br or line).

> line:
> + Is easy to style
Agreed.

> + Is easy to define what semantic category it belongs to
I don't understand this.

> + Gives you the possibility to style each context setting
See above.

> - Corresponds more to the html syntactical system, making translation to
> and from pure text harder (also related to second positive)
Can you give me an example of "pure text" that can't be marked up
appropriately without br?

> - Is easy to abuse (e.g. <line /> which also provides some parsing, as well
> as rendering, issues)
I agree it can be easily abused, but I don't think it's possible to
devise a solution that's not. On the bright side, I think line isn't
likely to be abused as much as br (whatever comfort that may be),
primarily because its intended use is clear from its name.

> - Space inefficient
See above.

> - Complex
See above.

--
Cheers,
 John Lewis

Received on Monday, 23 September 2002 19:40:01 UTC