Text Formatting in HTML | Lesson 10 HTML Tutorial
HTML text formatting Image

Text Formatting in HTML | Lesson 10 HTML Tutorial

In this lesson you will learn how to make the text strong, bold, italic, deleted, inserted, and marked. Through this lesson you will learn all HTML text formatting tags.

Text Formatting Video

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:

Text Formatting Elements:

  • <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> 

Note: Don’t confuse between paragraph tag <p> and bold tag <b>.

Also <strong> tag gives the same result of <b>.

Example:

 <strong>This text is strong</strong> 

HTML <i> and <em> Elements

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

 <i>This text is italic</i> 

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

Example:

 <em>This text is emphasized</em> 

HTML <small> Element

The HTML <small> element defines smaller text.

Example:

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

HTML <mark> Element

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

Example:

 <h2>HTML <mark>Marked</mark> Formatting</h2>

HTML <del> Element

The HTML <del> element defines deleted (removed) text.

Example:

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

HTML <ins> Element

The HTML <ins> element defines inserted (added) text.

Example:

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

HTML <sub> Element

The HTML <sub> element defines sub scripted text.

Example:

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

HTML <sup> Element

The HTML <sup> element defines super scripted text.

 <p>This is <sup>super scripted</sup> text.</p>


This post is one of the HTML5 for deep understanding course. where we will learn every common elements from basic to the advanced element.

In addition each lesson has a video which you could visit and watch for more practicing and for deep understanding.

We hope that we could give the best for you and for the deep and easy understanding.

You could follow the series from our website SAFHATECH.com and go to categories and then programming and then Choose the course you want then just click next post to go step by step.

Finally we hope every thing is works as you suspect.


Consequently You could follow us at :

Website URL: https://www.safhatech.com/

Youtube: https://www.youtube.com/channel/UCIVzh6iykNowNcOUT5Gfasw

Twitter: http:// https://twitter.com/safhatech

Instegram: https://www.instagram.com/safhatech

Facebook: http:// https://www.facebook.com/Safhatech-487171875443687

Phone:967772223681

This Post Has 3 Comments

  1. Hello there! This post could not be written any better! Reading through this post reminds me of my old
    room mate! He always kept talking about this. I will forward this
    page to him. Fairly certain he will have a good read. Thanks for sharing!

    1. Mofreh

      Thanks a lot.
      This could support me do the best

  2. keyword

    Wow, superb blog structure! How long have you ever been running a
    blog for? you made running a blog look easy. The full glance of your web site is great, let alone the content material!

Leave a Reply