Table of Contents
Formatting tags in HTML
Other then style attributes HTML also has some formatting elements which helps to format text.
HTML has following tags which allows us to format text
- <b>
- <i>
- <u>
- <strong>
- <strike> or <s> or <del>
- <mark>
- <marquee>
- <sup>
- <sub>
<b> : Bold tag. It will make text bold or strong but without any importance. e.g.
<b>Bold</b> tag
Bold tag
<i> : Italic tag. It will make text italic.
<i>Italic</i> tag
Italic tag
<u> : Underline tag, it will underline the text enclosed in it.
<u>Underline</u> tag
Underline tag
<strong> : Strong tag, It will make text bold or strong but with importance.
<strong>Strong</strong> tag
Strong tag
<strike> or <s> : Strike tag, it is use to represent line through text or we can say that it is use to represent delete text. Hance it is same as <del> tag.
<strike>Strike</strike>tag
Striketag
<mark> : Mark tag is use to highlight the text, it will highlight the text in yellow.
<mark>Mark</mark> tag
Mark tag
<marquee> : Marquee tag, it will scroll the text across the screen.
<marquee>Marquee</marquee> tag
tag
<sup> : Superscript tag, it will display text above the normal line.
<sup>Superscript</sup> tag e.g. X<sup>2</sup>
Superscript tag e.g. X2
<sub> : Subscript tag, it will display text below the normal line.
<sub>Subscript</sub> tag e.g. X<sub>2</sub>
Subscript tag e.g. X2