View Full Version : OK to use the br tag?

09-09-2008, 09:35 PM
I have a list that contains two lines per bullet point, is it semantic and proper to be using the br tag to control my line breaks for this? or for a paragraph of text for that matter? should I be creating the line breaks by setting the width of the element?

Going back to my list though setting the width is not giving me the perfect breaks.

Also what are the <dd> and <dt> tags, I've seen some of the well regarded sites using these tags, when should / can these be used?

09-09-2008, 10:03 PM
I don't think you'll do much to the semantical beauty of the list if you add a BR, but I don't understand why the width won't help you out. Do you have a link with description?

DD and DT are definitions. I never had much use of them, but some CSS design folks I know use them all the time. I used to use them in sitemaps, but not really sure that came in under the 'definition' definition, so I stopped that.

09-10-2008, 12:07 AM
Hi dom cheers, the width will help me but it just doesn't break the lines exactly where I want them. I'm being a bit petty but I just want my line breaks in the same place as the mock up that my client gave me.

This is the page, its the list on the left hand side

Its just a single web page for someone I didn't design it by the way just built it.

Its validating with the strict doc type so br tags can't be viewed as being that bad by the w3c.

How would you do this, just with width?

09-10-2008, 12:32 AM
I would do it with width, but like I said it won't hurt very much using a BR.
You're fine, I don't think you should worry about it.

On the other hand you should educate your client about the web. Having the site look the same in all situations is utopia. That is not what the web is. By adding a BR you might make the site unusable in some situations. Increase the font size and you realize the benefit of letting the browser decide where the break goes.

Also remember that a document can be absolutely wrong set up, using tables for layout, js for main navigation, use semantic tags in wrong places for the wrong things and still be 100% valid html/css. I said in another thread that validity is mostly a thing you watch out for during development. For real life cases the only thing that matters is that it works. google.com doesn't validate..

Actually your page is a study in how clean the code can be if you properly use CSS and HTML, good stuff!

09-10-2008, 07:27 PM
Thanks Dom I appreciate those comments.

09-11-2008, 12:34 AM
This page (http://westciv.com/style_master/index.html) uses a definition list for the product info like version, platform and costs.

09-11-2008, 01:42 PM
Looks good does that Style master Cary, have you used it?

09-11-2008, 11:21 PM
I've tried it (you can trial it for 30 days I think). It has some nice features, but it can only edit external style sheets. Its interface is similar to DW's CSS Rule definition requestor. I still prefer and use Top Style.

Style Master has a beta of version 5 available for the Mac. There's mention of it in support forums. I don't think you have to be a registered user to try it.

09-12-2008, 11:31 PM
I see Top Style has a real time CSS design view.. I believe the new (next) DW has this...

It would be nice, my F12 button is wearing thin !

09-13-2008, 12:11 AM
Its preview can be set to refresh every time you make a change, but it only has good support for IE's Trident rendering engine which is easy to implement. You can sort of get Gecko rendering by using the Mozilla ActiveX Controller, but that's not too useful as the controller hasn't been updated since Firefox 1.2 or somewhere around there.

09-17-2008, 11:15 AM
I see Top Style has a real time CSS design view.. I believe the new (next) DW has this...

It would be nice, my F12 button is wearing thin !

see what you think of fhe hawkeye plugin