HTML Text Formatting

HTML Text Formatting:

HTML Formatting Elements:-

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>    -Smaller text
  • <del>         -Deleted text
  • <ins>          -Inserted text
  • <sub>          -Subscript text
  • <sup>          -Superscript te

     HTML <b> elements:-

    The html <b> element defines the bold text,without any extra importance.                                                                               Example:- 

    <b>This text is bold</b>

 HTML <strong> elements:-

The html <strong> element defines text with strong importance.The content inside is typically displayed in bold.

Example:-

<strong>This text is strong</strong>

 HTML <I> elements:-

 The HTML <i> element defines a part of text in an alternate voice or mood. The content inside is typically displayed in italic.
 Example:-
 <i>This text is italic</i>

 HTML <em> elements:-

The HTML <em> element defines a emphasized text.The content inside is typically displayed in Italic.

Example:-

<em>This text is emphasized</em>

HTML <mark> elements:-

The HTML <mark>element defines the text that shold be marked or hi

Example:-

<p>do not forget to buy<mark>milk</mark>today.</p>

HTML <small> elements:-

The HTML <small> element defines the text is samll.

Example:-

<small>This is some smaller text</small>

HTML <del> elements:-

The HTML <del> element defines the text that has been deleted from a document.Browsers usually strike a line through deleted text.

Example:-

<p> My favourite color is <del> blue</del>.red</p>

HTML <ins> elements:-

The HTML <ins> element defines the text has been inserted into a document.

Example:-

<p>My favourite color is<del>blue</del> <ins>red</red>.</p>

HTML <sub> elements:-

The HTML <sub> element defines the subscript text.Subscript text appears half a character below the normal line, and is sometimes rendered in a smaller font. Subscript text can be used for chemical formulas, like H2O:

Example:-

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

HTML <sup> elements:-

The HTML <sup> element defines superscript text. Superscript text appears half a character above the normal line, and is sometimes rendered in a smaller font. Superscript text can be used for footnotes, like WWW[1]:

Example:-
<p>This is <sup>superscripted</sup> text.</p>