Formatting Elements

HTML offers various formatting tags to style content for better readability and emphasis. These tags help make text bold, italic, highlighted, and more, enhancing the user experience.


Common Formatting Tags

Tag Description
<b>Bold text
<strong>Important (semantic bold)
<i>Italic text
<em>Emphasized (semantic italic)
<mark>Marked (highlighted) text
<small>Smaller text
<del>Deleted (strikethrough) text
<ins>Inserted (underlined) text
<sub>Subscript text (e.g., H2O)
<sup>Superscript text (e.g., x2)

VS Code Style Example

<p>
  This is <b>bold</b>, 
  <strong>important</strong>, 
  <i>italic</i>, 
  and <em>emphasized</em> text.
Also <mark>marked</mark>, <small>small</small>, <del>deleted</del>, and <ins>inserted</ins>.
Water is H<sub>2</sub>O and math is x<sup>2</sup>. </p>

Output Preview

This is bold, important, italic, and emphasized text.
Also marked, small, deleted, and inserted.
Water is H2O and math is x2.

<b> and <strong> Elements

Output :

<i> and <em> Elements

Output :

<small> Element

Output :

<mark> Element

Output :

<del> Element

Output :

<ins> Element

Output :

<sub> Element

Output :

<sup> Element

Output :