HTML Text formatting

HTML text formatting involves using HTML tags to define the appearance and structure of text on a webpage. Here are some commonly used HTML tags for text formatting:

  1. Bold Text: <b> or <strong>

<b>This text is bold.</b>
<strong>This text is strong and bold.</strong>

2. Italic Text: <i> or <em>


<i>This text is italic.</i>
<em>This text is emphasized and italic.</em>

3. Underlined Text: <u>


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

4. del Text: <del>


<del>This text is deleted.</del>

5. Marked Text: <mark>


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

6. Small Text: <small>


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

7. Subscript Text: <sub>


H<sub>2</sub>O

8. Superscript Text: <sup>


E = mc<sup>2</sup>