Home > Abakada: Back to Basics > Language References > HTML Elements > B Element
Renders text in boldface type | HTML 2, 3.2, 4, 4.01, 5 |
HTML Syntax
<b
class = classname
id = value
style = css_style_rules
title = text
>
NOTE: Both start and end tags are required.
The <b > element represents a span of text to which attention is being drawn for practical purposes.
The element represents notice, awareness or recognition, and is approprtiate for the following.
- key words in a document abstract
- product names in a review
- an article lede
- actionable words in interactive text-driven software
Most browsers render text within <b > tags in boldface by default.
Authors can use CSS, though, to convey additional semantic information as needed, for example, to change color or font-weight. This makes it easier to manage multiple use cases of the <b > element.
For instance, the <b > tags within the pages in this workshop render in darkgreen, and in another color within code sample snippets.
This element is similar in function to the <strong> element.
The <b> element has no attribute of its own, but supports global attributes common to all HTML elements.
The following shows how the b element may be used.
<p>This paragraph has <b>some bold text</b>.</p>
which would render on a Web page as
This paragraph has some bold text.
EM I S STRIKE STRONG U
|