HTML Text Formatting Elements

HTML Text Formatting Elements

HTML contains a number of tags with special meaning that you can use to display content that appears differently from the normal text on your web pages.

It is also used for logical text-formatting elements , text formatting tags and exercises, text formatting style and example, and text formatting in html code.

HTML <b> and <strong> elements

The HTML belement displays the text in bold, without any extra importance such as a keyword or a place name.

It is used only to attract the user's attention without giving any special meaning to the text.


I am from <b>paris</b>


I am from paris.

The HTML strong tag used to defines highly important content in a document.

Typically, the contents within the strong tag are displayed in bold.


<strong>This text is important!</strong> 
<p>This liquid is <strong>highly toxic</strong>.</p>
<p>I am counting on you. <strong>Do not</strong> be late!</p>


This text is important!
This liquid is highly toxic.
I am counting on you. Do not be late!

It is also used for difference between b and strong elements, html em strong b, html email b or strong, bold text and bold style ,underline, heading, strong meaning and strong underline, and strong deprecated.

HTML <i> and <em> elements

The HTML i element displays a part of the text in italic format.

Softwares like screen reader read the text in different tone of voice.

The i tag is often used to indicate a technical keyword, a phrase, a quote, the name of an object, etc.


<i>This text is italic</i>


This text is italic

The HTML em tag indicates the more stressed emphasis on its contents in comparison with the text around it..

A screen reader will pronounce the words/text in em tag with an emphasis.


<em>This text is emphasized</em>
<p>I am <em>glad</em> you weren't <em>late</em>.</p>


This text is emphasized
I am glad you weren't late.

It is also used for i vs em, i tag onclick and i tag name, image, disabled, html italic text and italic style, header, italic in paragraph, em size and meaning, dash code, space, emphasized text in html.

HTML <small> elements

The HTML small element defines content which is not the important of the page and it display in smaller font size by browser.

For example, copyright statement, licensing information, disclaimer, side comments, or restrictions and so on.


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


This is some smaller text.

It is also used for text, small tag syntax and font size, small tag deprecated and alternative , and small code.

HTML <mark> Element

The HTML mark element specifies text that should be highlighted due to its importance in another context.


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


Do not forget to buy milk today.

It is also used for html question mark element, mark tag with different color, mark tag not working in outlook, html mark code, html mark input as invalid.

HTML <del> Element

The HTML del (deleted text) tag represents text that has been removed from a page.

Browsers will draw a line on the text.


<p>My favorite color is <del>Green</del>dark blue.</p>


My favorite color is Green dark blue.

It is also used for del tag color, del element, del ins, del vs ins, del style and dlt class, href, button, symbol, code, delete button in table, delete row from table, delete confirmation.

HTML <ins> Element

The HTML ins (inserted text) tag represents newly added text in a document.

Browsers will draw a underline on the inserted text.


<p>My favorite color is <del>yellow</del> <ins>rose</ins>.</p>


My favorite color is yellow rose.

It is also used for insert background image and insert table, space, line, button, text box, insert variable into text, ins vs u, ins underline, ins tag cite.

HTML <sub> Element

The HTML sub element defines subscript text in a smaller font.

It appears under the normal line half a character.

Chemical formulas like H2O can be written in subscript text.


<p>This is H<sub>2</sub>O</p>


This is H2O

It is also used for sub element by id, html sub tag list, sub tag not working, sub heading tag, and sub code.

HTML <sup> Element

The HTML sup tag defines superscript text (appears above normal line half a character) in a smaller font.

It can be used for chemical formulas, footnotes, mathematical equations, and so on.


<p>My parents wedding day is on the 12<sup>th</sup> of June 2005.</p>


My parents wedding day is on the 12th of June 2005.

It is also used for sup tag not working and sup tag line height, means, style, uses, what are sup tag, and what does the sup tag do in html.