HTML CSS JAVASCRIPT PYTHON JAVA PHP BOOTSTRAP

HTML Formatting

HTML formatting elements are used to define how text should appear on a web page. These elements allow you to highlight important content, emphasize text, and improve readability for users.

HTML <b> and <strong> Elements

The <b> element makes text bold without adding extra importance.

Example
<b>This is bold text</b>
Try this code

The <strong> element represents important text and is also bold.

Example
<strong>This is important text</strong>
Try this code

HTML <i> and <em> Elements

The <i> element displays text in italic style without emphasis.

Example
<i>This is italic text</i>
Try this code

The <em> element emphasizes text and is typically displayed in italics.

Example
<em>This is emphasized text</em>
Try this code

HTML <u> Elements

The <u> element underlines text. It should be used carefully because underlined text is often confused with links.

Example
<u>This is underlined text</u>
Try this code

HTML <small> Elements

The <small> element defines smaller text, often used for notes or disclaimers.

Example
<small>This is small text</small>
Try this code

HTML <mark> Elements

The <mark> element highlights text with a background color.

Example
<mark>This is highlighted text</mark>
Try this code

HTML <del> and <ins> Elements

The <del> element shows deleted text, usually displayed with a line through it.

Example
<del>This is deleted text</del>
Try this code
The <ins> element shows inserted text, often underlined.
Example
<ins>This is inserted text</ins>
Try this code

HTML <sub> Elements

The <sub> element displays text as subscript.

Example
<sub>This is subscripted text</sub>
Try this code

HTML <sup> Elements

The <sup> element displays text as superscript.

Example
<sup>This is superscripted text</sup>
Try this code

Formatting Best Practices

Common Formatting Mistakes