HTML Basic Tags
Text Formatting Tags
HTML has tags that give special meaning or appearance to parts of your text.
| Tag | Result | Meaning |
|---|---|---|
<strong> | bold | Very important text |
<b> | bold | Bold without extra importance |
<em> | italic | Stressed emphasis |
<i> | italic | Different voice, technical terms, foreign words |
<mark> | highlighted | Marked or highlighted text |
<small> | smaller text | Side comments, fine print |
<del> | struck through | Deleted text |
<ins> | underlined | Inserted text |
<sub> | H₂O | Subscript |
<sup> | x² | Superscript |
<code> | monospace | A piece of code |
Example:
<p>Please <strong>save your work</strong> before closing.</p>
<p>I <em>really</em> love coding.</p>
<p>Water is H<sub>2</sub>O and 2<sup>3</sup> = 8.</p>
<p>Price: <del>Rs 2,999</del> <ins>Rs 1,999</ins></p>
<p>Search for <mark>HTML</mark> in the docs.</p>
<p>Run <code>npm install</code> first.</p>