If you use a word processor, you must be familiar with the ability to make text bold, italicized, or underlined; these are just three of the ten options available to indicate how text can appear in HTML and XHTML.
Anything that appears within <b>…</b> element, is displayed in bold as shown below −
<p><b>This text is bold</b></p>
Anything that appears within <i>…</i> element is displayed in italicized as shown below −
<p><i>This text is italic</i></p>
This text is italic
The following word uses an This text is italic typeface.
In the previous chapter, you learned about the HTML style attribute.
HTML also defines special elements for defining text with a special meaning.
HTML uses elements like
<i> for formatting output, like bold or italic text.
Formatting elements were designed to display special types of text:
<b>– Bold text
<strong>– Important text
<i>– Italic text
<em>– Emphasized text
<mark>– Marked text
<small>– Small text
<del>– Deleted text
<ins>– Inserted text
<sub>– Subscript text
<sup>– Superscript text
<b> element defines bold text, without any extra importance.
<em>element defines emphasized text, with added semantic importance.