basics of website design banner photo

HTML

HTML 5

CSS 2.1

CSS 3

Reference



HTML5 <b> (bold) Element

In HTML4 using the bold element was discouraged as it dealt with presentation and CSS is the language of choice when it comes to visual page presentation. But as with the other presentational elements <u> and <i> it is included in HTML5 with a different meaning.

The definition given by the W3C is:

The b element represents a span of text offset from its surrounding content without conveying any extra emphasis or importance, and for which the conventional typographic presentation is bold text; for example, keywords in a document abstract, or product names in a review. (W3C spec.)

In other words it signifies text that in normal usage would be shown in bold as shown in the two example cases. The text is highlighted to draw the user's attention without being any more important than the surrounding text.

In my opinion it can be argued that this definition is confusing and possibly flawed due to the following reasons:

To me it seems that the <b> element now has two conflicting roles, the theoretical meaning given in the specification of not adding emphasis or importance, versus the popular usage role of separating and adding importance to text.

Accessibility considerations

As with HTML4 the <em> and <strong> elements add emphasis and strong emphasis to text respectively and to assist visually impaired users it is good practice to employ these elements when you need these effects. In theory screen readers can change the voice or stress used when encountering these elements to indicate the added emphasis - whereas <b> and <i> add no extra emphasis and will be "spoken" differently/normally.

This seems to favour the argument that <b> should be kept as a purely presentational element instead of giving it a meaning beyond the visual.

Conclusion

Much has been written on the inclusion of what were purely presentational elements in HTML5 and all you can do as a web developer is to be aware of the specification and use these tags where you feel they are appropriate whichever side of the fence you fall on.

HTML5 - <b> (bold) Attributes

HTML5 Changed Elements