Md Robiul Islam avatar

HTML Text Formating

rabiul21

Published: 30 Apr 2018 › Updated: 30 Apr 2018HTML Text Formating

HTML Text Formating

HTML Text Formatting

Text Formatting

This text is boldThis text is italicThis is subscript and superscrip

HTML Formatting Elements

In the previous chapter, you learned about the HTML style attribute.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>Try it Yourself »The HTML <strong> element defines strongtext, with added semantic "strong" importance.

Example

<strong>This text is strong</strong>Try it Yourself »

HTML <i> and <em> Elements

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

Example

<i>This text is italic</i>Try it Yourself »The HTML <em> element defines emphasizedtext, with added semantic importance.

Example

<em>This text is emphasized</em>Try it Yourself »Note: Browsers display <strong> as <b>, and <em> as <i>. However, there is a difference in the meaning of these tags: <b> and <i> defines bold and italic text, but <strong> and <em>means that the text is "important".

HTML <small> Element

The HTML <small> element defines smallertext:

Example

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

HTML <mark> Element

The HTML <mark> element defines marked or highlighted text:

Example

<h2

Exampl element defines inserted(added) text.

Example

<p>My favorite<ins>color</ins> is red.</p>

HTML <sub> Element

The HTML <sub> element defines subscriptedtext.

Example

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

HTML <sup> Element

The HTML <sup> element defines superscriptedtext.

Example

<p>This is <sup>superscripted</sup>text.</p>
Try it Yourself »

Test Yourself with Exercises

HTML Text Formatting Elements

TagDescription<b>Defines bold text<em>Defines emphasized text <i>Defines italic text<small>Defines smaller text<strong>Defines important text<sub>Defines subscripted tex tags/tag_sup.asp"><sup>Defines superscripted text Defines deleted textDefines marked/highlighted text

![images (1).jpeg]( [source]()![images (1).jpeg](

Leave HTML Text Formating to:

Written by

I am a Web design and Developer

Read more #formating posts


Best Posts From Md Robiul Islam

We have not curated any of rabiul21's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Md Robiul Islam