Home » HTML » What Is HTML Text Formatting In HTML

What Is HTML Text Formatting In HTML

HTML Formatting Elements

In the previous chapter, you learned about the HTML style attribute. In this lecture we learn HTML Text Formatting. 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:

  1. <b> – Bold text
  2. <strong> – Important text
  3. <i> – Italic text
  4. <em> – Emphasized text
  5. <mark> – Marked text
  6. <small> – Small text
  7. <del> – Deleted text
  8. <ins> – Inserted text
  9. <sub> – Subscript text
  10. <sup> – Superscript text


<sub> Element In HTML

The HTML <sub> element defines subscripted or superscripted text.For Example

<p>This is <sub>subscripted</sub> text.</p>


<p>This is <sup>superscripted</sup> text.</p>

<em> Elements In HTML

The HTML <i> element defines italic text

<i>This text is italic</i>

<em> Elements In HTML


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

<em>This text is emphasized</em>

<small> Element In HTML

The HTML <small> element defines smaller text for example:-

<h2>HTML <small>Small</small> Formatting</h2>

<mark> Element In HTML

The HTML <mark> element defines marked or highlighted text For Example

<h2>HTML <mark>Marked</mark> Highlighted</h2>

<del> Element In HTML

The HTML <del> element defines deleted Text For Example

<p>i <del>Like to play</del> cricket</p>

<b> Element In HTML

The HTML <b> element defines bold text,

<b>This text is bold</b>

<strong> Element In HTML

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

<strong>This text is strong</strong>

HTML Text Formatting Elements

<b> Defines bold text
<em> Defines emphasized text
<i> Defines italic text
<small> Defines smaller text
<strong> Defines important text
<sub> Defines subscripted text
<sup> Defines superscripted text
<ins> Defines inserted text
<del> Defines deleted text
<mark> Defines marked/highlighted text
, , ,

Leave a Reply

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


error: Sorry You Have Not Permission To Copy!