HTML Text Formatting Elements

This post “HTML Text Formatting elements” explains clearly about how to format the text in a web page by applying properties like bold, italic, underline, marked and much more. This post also explains about Subscript and Superscript text tags.


Text Formatting :

  • HTML defines special elements, for defining text with a special meaning.
  • HTML uses elements like <b> and <i> for formatting output, like bold or italic text.

<html>
<body>
<p>This text is normal.</p>
<p><b>This text is bold.</b></p>
<p><i>This text is italic.</i></p>
<p><em>This text is emphasized.</em></p>
<h2>HTML <small>Small</small> Formatting</h2>
<h2>HTML <mark>Marked</mark> Formatting</h2>
<p>My favorite color is <del>blue</del> red.</p>
<p>My favorite <ins>color</ins> is red.</p>
<p>This is <sub>subscripted</sub> text.</p>
<p>This is <sup>superscripted</sup> text.</p>
</body>
</html>

 

SubScript and SuperScript elements in HTML :

<html>
<body>
<p>H<sub>2</sub>SO<sub>4</sub></p>
<p>X<sup>2</sup>+Y<sup>2</sup>=Z<sup>2</sup></p>
</body>
</html>

 

HTML Abbreviations 

Share this