<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
<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:
- The act of making text bold draws the user's eye and in real terms makes it more important than the surrounding text - visitors will scan the page and pick out the bold text first.
- Using the
<b>element effects the visual presentation of the page and as such it should be the preserve of CSS and not HTML.
- The inclusion of elements which affect presentation in HTML5 such as
<b>is sometimes justified on the grounds that it preserves backwards compatibility and because browsers already support these elements and know how to render them. The problem I have with this is that the vast majority of bold text on the Internet is used to add importance to the content, something which contradicts the HTML5 definition of the
<b>element, so in effect this argument reinforces a use which is no longer in line with the element specification.
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.
As with HTML4 the
<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 -
<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.
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.