Name
<B> — NN all IE all HTML all
Synopsis
<B>...</B>
End Tag: Required
The B
element—one of several font style elements in HTML
4—renders its content in a boldface version of the font face
governing the next outermost HTML container. You can nest multiple
font style elements to create combined styles, such as bold italic
(<B><I>bold-italic
text</I></B>).
It is up to the browser to fatten boldface display by calculating the
character weight or by perhaps loading a bold version of the
currently specified font. If you are striving for font perfection, it
is best to use style sheets (and perhaps downloadable fonts) to
specify a true bold font face, rather than risk the browser’s
extrapolation of a boldface from a system font. The
font-weight style attribute provides quite
granular control over the degree of bold applied to text if the font
face supports such fine-tuning.
You can take advantage of the containerness of this element by
assigning style sheet rules to some or all B
elements in a page. For example, you may wish all
B elements to be in a red color. By assigning the
style rule B
{color:red}, you
can do it to all elements with only a tiny bit of code.
Although this element is not deprecated in HTML 4, it would not be surprising to see it lose favor to style sheets in the future.
Example
<P>This product is <B>new</B> and <B>improved</B>!</P>
Object Model Reference
- IE
[window.]document.all.elementID
Attributes
|
|
|
|
|
|
|
|
|
Event Handler ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access