HTML also 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.

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
HTML <b> and <strong> Elements

The HTML <b> element defines bold text, without any extra importance.

Example 

<b>This text is bold</b>

 

The HTML <strong> element defines strong text, with added semantic “strong” importance.

Example 

<strong>This text is strong</strong>

 

HTML <i> and <em> Elements

The HTML <i> element defines italic text, without any extra importance.

Example 

<i>This text is italic</i>

 

The HTML <em> element defines emphasized text, with added semantic importance.

Example 

<em>This text is emphasized</em>

Leave a Reply

Your email address will not be published. Required fields are marked *