To strong or to b
About a year ago, I filed a bug; when you highlighted text, and then clicked the BOLD tool bar button, it set the text to <strong> not bold. But the bold button is supposed to make things bold, not strong isn't it?
In most browsers, the rendering of <b> and <strong> are identical, so they're pretty interchangeable. But this doesn't work so well in cases where the user might be using a screen reader. Typically <b> is used as a visual presentation marker, where as <strong> implies that there is to be a stronger emphasis here. Some screen readers will change how they read things in <strong> tags, but not for <b> tags.
So which one is right? We decided on using <strong> as the correct markup to emphasize something. I know we'll hear from some people that this is the wrong thing to do. If you're trying to reduce your html code base, and send less data down the pipe, than this certainly isn't the way. But, it is the correct way to go about doing it if you want your web site to be fully accessible. You can always cut back a character here or there to make up for it ;)
Comments
- Anonymous
June 28, 2005
I think you are doing the right thing (although it's very annoying that Microsoft's WHidby server controls generate b tags when they should be generating strong tags). You should be aiming to separate presentation from semantics. Use HTML for semantics (this is a table, this is an unordered list, this is a paragraph) and CSS for presentation (this is bold, this is red, this is italics). The strong tag is semantic the b tag is presentational so in your HTML you should be coding strong not b. The same goes for em (for emphasis) vs the i (italics) tags. - Anonymous
June 29, 2005
The comment has been removed