HTML Formatting is the way of displaying text in different formats in HTML.
List of text HTML formatting tags
Sr. No. | image attributes | Description |
---|---|---|
1 | <b> | Used to make text bold. See HTML bold tag for more details. |
2 | <i> | Used to make text italic. See HTML italic tag for more details. |
3 | <u> | Used to make text underline. See HTML underline tag for more details. |
4 | <sub> | Used to make text subscribed. The text display half below the main character text. See HTML sub tag for more details. |
5 | <sup> | Used to make text superscribed. The text display half above the main character text. See HTML sup tag for more details. |
6 | <del> | Used to make text appear as deleted text. See HTML del tag for more details. |
7 | <big> | Used to make text larger. It display the text one font size larger the other text. See HTML big tag for more details. |
8 | <small> | Used to make text smaller. It display the text one font size smaller the other text. See HTML small tag for more details. |
9 | <strong> | Used strong appearance of the text. See HTML strong tag for more details. |
10 | <em> | Used to make text italic with some importance. See HTML em tag for more details. |
11 | <mark> | Used to highlight a text. See HTML mark tag for more details. |
12 | <ins> | Used to show inserted text. See HTML ins tag for more details. |
Bold text
<b> tag used to make the text appear with some weight, more dark.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Bold tag Example HTML Formatting</title> </head> <body> <b>Bold text appearance with some font weight.</b> </body> </html> |
Output
Italic text
<i> tag used to make the text appearance italic as of word doc italic text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Italic tag Example HTML Formatting</title> </head> <body> <i>Italic text appearance as of word document.</i> </body> </html> |
Output
Underline text
<u> tag used to make the text appearance underline as of word doc underline text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Underline tag Example HTML Formatting</title> </head> <body> <u>Underline text appearance as of word document.</u> </body> </html> |
Output
Superscript text
<sup> tag used to show superscript text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Superscript tag Example</title> </head> <body> <p>Text appearance <sup>superscript text</sup> as of word document. To show square X<sup>2</sup> for math notation.</p> </body> </html> |
Output
Text appearance superscript text as of word document. To show square X2 for math notation.
Subscript text
<sup> tag used to show subscript text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Subscript tag Example</title> </head> <body> <p>Text appearance <sub>subscript text</sub> as of word document.</p> </body> </html> |
Output
Text appearance subscript text as of word document.
Deleted text
<del> tag used to show deleted text which looks like removed text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Removed tag Example</title> </head> <body> <p>Text appearance <del>deleted text</sub> looks like removed text.</p> </body> </html> |
Output
Text appearance deleted text looks like removed text.
Big text
<big> tag used to show larger text which looks one font larger than previous text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Big tag Example</title> </head> <body> <p>This is a <big>larger text</big> looks one font bigger text.</p> </body> </html> |
Output
This is a larger text looks one font bigger than the previous text.
Small text
<small> tag used to show smaller text which looks one font smaller than previous text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Small tag Example</title> </head> <body> <p>This is a <small>smaller text</small> looks one font smaller text.</p> </body> </html> |
Output
This is a smaller text looks one font smaller text.
Strong text
<strong> tag used to show strong weighted text which looks same as bold text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Strong tag Example</title> </head> <body> <p>This is a <strong>strong text</strong> looking as bold font text.</p> </body> </html> |
Output
This is a strong text looks bold text.
Emphasis text
<em> tag used to make text italic with some importance given to the text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Emphasis tag Example</title> </head> <body> <p>This is a <em>emphasis text</em> with some importance text.</p> </body> </html> |
Output
This is a emphasis text with some importance text.
Mark text
<mark> tag used to hightlight a text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>Mark tag Example</title> </head> <body> <p>This is a <mark>mark text</mark> to highlight a text.</p> </body> </html> |
Output
This is a mark text to highlight a text.
Inserted text
<ins> tag used to show inserted text.
1 2 3 4 5 6 7 8 9 |
<!DOCTYPE html> <html> <head> <title>ins tag Example</title> </head> <body> <p>This is an <ins>inserted</ins> text.</p> </body> </html> |
Output
This is an inserted text.