HTML Text Formatting Tags


1. <b> – Bold Text

Makes text bold (without importance).

Example:

<p>This is <b>bold</b> text.</p>


2. <strong> – Important Bold Text

Shows important text in bold.

Example:

<p>This is <strong>important</strong> text.</p>


3. <i> – Italic Text

Displays text in italic style.

Example:

<p>This is <i>italic</i> text.</p>


4. <em> – Emphasized Text

Shows stressed/importance with italic.

Example:

<p>This is <em>emphasized</em> text.</p>


5. <u> – Underlined Text

Shows text with underline.

Example:

<p>This is <u>underlined</u> text.</p>


6. <mark> – Highlighted Text

Highlights text (yellow by default).

Example:

<p>This is <mark>highlighted</mark> text.</p>


7. <small> – Smaller Text

Reduces text size.

Example:

<p>This is <small>small</small> text.</p>


8. <del> – Deleted/Strikethrough Text

Shows removed or cut text.

Example:

<p>Old Price: <del>$100</del></p>


9. <ins> – Inserted Text

Shows inserted/added text (underlined).

Example:

<p>New Price: <ins>$80</ins></p>


10. <sub> – Subscript Text

Text appears slightly below baseline.

Example:

<p>Water: H<sub>2</sub>O</p>


11. <sup> – Superscript Text

Text appears slightly above baseline.

Example:

<p>X<sup>2</sup> + Y<sup>2</sup></p>


12. <code> – Computer Code

Displays text in monospace font.

Example:

<p>Use <code>print()</code> to display output.</p>


13. <pre> – Preformatted Text

Preserves spaces and line breaks.

Example:

<pre> Line 1 Line 2 Line 3 </pre>


14. <q> – Short Inline Quote

Used for short quotations.

Example:

<p>He said, <q>Hello!</q></p>

15. <blockquote> – Long Quote

Shows large block quotations.

Example:

<blockquote> This is a long quoted paragraph. </blockquote>


16. <cite> – Citation / Title

Shows title of a work (italic by default).

Example:

<p><cite>Ramayana</cite> is an ancient Indian epic.</p>


17. <kbd> – Keyboard Input

Shows keyboard input text.

Example:

<p>Press <kbd>Ctrl</kbd> + <kbd>C</kbd></p>


18. <br> – Line Break

Moves text to next line.

Example:

Hello<br>World


19. <hr> – Horizontal Line

Creates a horizontal rule.

Example:

<p>Section 1</p> <hr> <p>Section 2</p>