XHTML 2.0 line breaks
January 18, 2006
It seems that the XHTML 2.0 spec has removed the line break tag (<br>) from the spec all together. When I first heard this from Chris, I was really confused. The BR tag, while problematic, is a rather essential to getting a page to “look” right. I know that the CSS purists seem to hate the BR tag and find ways around using it (involving lists and paragraphs - a worse perversion than using tables for layouts in my humble opinion), but how would someone do a simple salutation in a BR’less world?
<p>
Thank you,<br/>
Paul Kimbrel<br/>
Programmer Extraordinaire<br/>
</p>
Without BR’s, you’d have to do something goofy involving marginless paragraphs or unordered lists. Ugh. Well, I just couldn’t believe they (the W3c) could pull a stunt like that with out a better solution. So, I looked up the spec myself.
Fortunately, they’re not leaving us in the lurch. Even better, the solution is far more elegant. They’re introducing some new tags to the spec and the one pertaining to this issue is the line tag: <l> Yep. Just “L”.
<p>
<l>Thank you,</l>
<l>Paul Kimbrel</l>
<l>Programmer Extraordinaire</l>
</p>
Now, we have more control over line spacing in general. Plus, we have more continuity in the DOM structure.