<br/>
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
<br> is part of the official W3C recommendations and is not deprecated. However, it is commonly used to break up paragraphs, which should be marked up as <p>Paragraph</p>. The br line does not have a commonly agreed upon usage. Some people believe it should be used for things like poetry, where line breaks have specific meaning (some claim that this is incorrect, and you should use <pre> or wait for XHTML 2.0's <l> tag.)
There is nothing wrong with using the <br> tag. Like Ambush Commander said, you should not use it to break up paragraphs, but for things like addresses, it is necessary I think.
Code: Select all
<p class="address">
<span class="name">John Eaton</span><br />
<span class="street">1234 Some Avenue</span><br />
<span class="locality">Johneaton, Indiana 54321</span>
</p>Unordered list is more appropriate for addresses in my opinion. Why? Because today you want your first name in its own line and your last name in another line, but tomorrow you might want them on the same line.
P.S I still have a conflict here with myself (:P) since I think that a list is not the best thing for this - semantically.
P.S I still have a conflict here with myself (:P) since I think that a list is not the best thing for this - semantically.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Isn't that what the <address/> tag is for?
"The <address> tag defines the start of an address. You should use it to define addresses, signatures, or authorships of documents. The address usually renders in italic. Most browsers will add a line break before and after the address element, but line breaks inside the text you have to insert yourself."
Although I did point you at microformats the other day (and Maugrim as well I see) - I never felt comfortable with them conceptually. They seem like a hack to me, so I don't personally use them.
Incidentally, the above is a fine example of a use for <br/>, though I would start to get worried if I was using it more than once in a while.
"The <address> tag defines the start of an address. You should use it to define addresses, signatures, or authorships of documents. The address usually renders in italic. Most browsers will add a line break before and after the address element, but line breaks inside the text you have to insert yourself."
Code: Select all
<address>
Donald Duck<br />
Box 555<br />
Disneyland
</address>Incidentally, the above is a fine example of a use for <br/>, though I would start to get worried if I was using it more than once in a while.
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
I use br elements to clear floats inside of containers that would otherwise have visual issues in good browsers like Gecko and Opera.
Code: Select all
<br style="clear: both;" />- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
I use <br /> tags whenever I need to break a line. That is what they are there for. They are meant tot break lines and other text that is not structured in a way that it is its own paragraph. <p> tags are paragraph tags, used to make paragraphs.
The whole issue of lists... well, that has me torn. On the one hand using lists for navigation is completely aside from the use of the list tag (somewhat, because in reality without CSS a list still makes a good navigation link list) but on the other hand you can do funky shiznit with lists to make them do really cool stuff.
The whole issue of lists... well, that has me torn. On the one hand using lists for navigation is completely aside from the use of the list tag (somewhat, because in reality without CSS a list still makes a good navigation link list) but on the other hand you can do funky shiznit with lists to make them do really cool stuff.
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
In the right context I agree with you. When people make tabbed buttons that hover a hidden div and reveal links associated with a given UL heading, then that is a little outside the scope of a list, in my opinion.The Ninja Space Goat wrote:Everah, what is a menu, but a list of links? I think that using an unordered list for navigation is exactly what lists are for. Not sure what you mean.
Don't get me wrong. I use them all the time in my designs. They are clearly semantically correct when listing links. I just think in some contexts the list is not truly a list in the way it is implemented.
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
I dislike lists for menus (though used one for version 2.7 of my site just over a year ago). However they aren't accessible! Just using CSS nothing truly is accessible (at the complexity I like to work with) but with JavaScript the menus on the next version of my site (preview http://www.jabcreations.net/) work just great in most modern browsers using just the keyboard and no mouse (tab, space (to open submenus), and enter). And the the developers who are too lazy to press the page down key I'm going to implement a "developer's keyboard" to keep them happy. However since they know how to toy with that stuff it will be the designer keyboard by default. I love this stuff!
Anyway the new menus I use are all divisible elements and we'll have to wait either for XHTML 2 or for some uber DTD editing genius to create a menu element for those serving their pages as application/xhtml+xml which I doubt will happen until I figure that stuff out myself.
Anyway the new menus I use are all divisible elements and we'll have to wait either for XHTML 2 or for some uber DTD editing genius to create a menu element for those serving their pages as application/xhtml+xml which I doubt will happen until I figure that stuff out myself.