[whatwg] [br] element should not be a line break
thomas.koetter at id-script.de
Mon Aug 9 04:07:03 PDT 2010
>It cannot be used if you don't want to include the words like
>"Street:", which are typically omitted, unless you add the <dt>s with
>display: none, which is unreasonable.
>Every group must have a <dt> element.
As Tab already pointed out, I quoted the error-recovery behavior. You were right that dl elements shouldn't be used without a dt element.
So, an address could be marked up like this:
<dt class="fn">P. Sherman</dt>
<dd class="street-address">42 Wallaby Way</dd>
Doing the same with explicit line breaks is awkward if you want to use microformats.
<span class="fn">P. Sherman</span><br>
<span class="street-address">42 Wallaby Way</span><br>
But I'm sure somebody can explain to me why line breaks must be part of the address.
>No elements do. Characters do, though. Every period, comma,
>semicolon, colon, and dash is a minor logical break in the paragraph,
>but it would be incorrect to use <br> for any of those.
Yes, even the space character breaks up a run of characters into words. My point is not that there are no other kinds of breaks. What I'm saying is that there's a somewhat stronger text-level break. Something that falls between character-type breaks and paragraph breaks. That something is used in poems and it can be used to split up an address. But in my opinion, that's definitely not a *line* break. Otherwise, a poem couldn't really be read aloud.
>So can omitting line breaks. The address
>123 Imaginary Place
>New York, NY 12345
>is not the same as
>123 Imaginary Place New
>York, NY 12345
Absolutely! But are these different addresses?
123 Imaginary Place New York, NY 12345
123 Imaginary Place | New York, NY 12345
123 Imaginary Place * New York, NY 12345
Street number: 123
Street: Imaginary Place
City: New York
Zip code: 12345
I would say no. Even though the first three don't contain a line break while the last one contains three additional line breaks. How can a *line* break then be part of the content?
>Indeed, the spec explicitly forbids using <br> where the line break is
>presentational: "br elements must be used only for line breaks that
>are actually part of the content, as in poems or addresses."
Now you're quoting the part of the spec that I say is wrong to prove me wrong. That's not fair!
Just eliminate the word "line" in the spec and everything is fine.
More information about the whatwg