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.
HTML <b> and <strong> elements
The HTML b
element 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.
Example
I am from paris
Output
The HTML strong
tag used to defines highly important content in a document.
Typically, the contents within the strong
tag are displayed in bold.
Example
This text is important!
This liquid is highly toxic.
I am counting on you. Do not be late!
Output
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.
Example
This text is italic
Output
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.
Example
This text is emphasized
I am glad you weren't late.
Output
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.
Example
This is some smaller text.
Output
HTML <mark> Element
The HTML mark
element specifies text that should be highlighted due to its importance in another context.
Example
Do not forget to buy milk today.
Output
Related Links
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.
Example
My favorite color is Greendark blue.
Output
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.
Example
My favorite color is yellow rose.
Output
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.
Example
This is H2O
Output
Related Links
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.
Example
My parents wedding day is on the 12th of June 2005.
Output