[whatwg] [br] element should not be a line break

Thomas Koetter thomas.koetter at id-script.de
Mon Aug 9 04:07:03 PDT 2010


Aryeh wrote:
>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.

Aryeh wrote:
>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:
<address class="vcard">
	<dl class="adr">
		<dt class="fn">P. Sherman</dt>
		<dd class="street-address">42 Wallaby Way</dd>
		<dd class="locality">Sydney</dd>
	</dl>
</address>

Doing the same with explicit line breaks is awkward if you want to use microformats.

<address class="vcard">
	<p class="adr">
		<span class="fn">P. Sherman</span><br>
		<span class="street-address">42 Wallaby Way</span><br>
		<span class="locality">Sydney</span>
	</p>
</address>

But I'm sure somebody can explain to me why line breaks must be part of the address.

Aryeh wrote:
>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.

Aryeh wrote:
>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
State: NY
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?

Aryeh wrote:
>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 mailing list