<b> Bold Tag Examples
Examples of the b
tag in HTML 5
Combining bold with other styles
If you try to underline bold text by coding the style
attribute on the <b> tag, the underline will also be bold:
<b style="text-decoration: underline">This Bold Text Has A Bold Underline Style Also</b>
This Bold Text Has A Bold Underline Style Also
To create bold text without a bold underline, the underline style must be coded on a separate element. With two different elements, the underline color can also be set independently of the text color.
<span style="text-decoration: underline; color: red"> <b style="color: black">This Bold Text Has A Thin Red Underline Style</b> </span>
This Bold Text Has A Thin Red Underline Style
The style
property is coded on the <b> tag to change the text color back to black since otherwise it would inherit the red color from the parent <span> tag.