Home Tutorials HTML Tutorial Text Formatting Tags
Text Formatting Tags

Text Formatting Tags


6. Text Formatting Tags

HTML includes elements for bold, strong importance, italic emphasis, marked text, deleted text, inserted text, and superscript or subscript text. Modern HTML favors semantic tags such as <strong> and <em> over purely visual markup.

Syntax

<strong>Important</strong>
<em>Emphasized</em>
<mark>Highlighted</mark>

Example

<p><strong>Important:</strong> Learn HTML basics first.</p>
<p><em>Practice</em> makes progress.</p>
<p>Water formula is H<sub>2</sub>O.</p>
<p>x<sub>2</sub> + y<sup>2</sup></p>

Output

Important appears bold, Practice appears emphasized, H2O shows the 2 as subscript, and x2 plus y2 shows 2 as superscript.
Example

🏋️ Test Yourself With Exercises

Take our quiz on Text Formatting Tags to test your knowledge.

Browse Quizzes »