Formatting Text in HTML
Headings
HTML provides six levels of headings, from <h1>
(most important) to <h6>
(least important).
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Paragraphs
Paragraphs are defined with the <p>
tag and are used to structure blocks of text.
<p>This is a paragraph of text in HTML.</p>
This is a paragraph of text in HTML.
Styling Text
HTML offers several tags to style and emphasize text:
<strong>Important text</strong>
<em>Emphasized text</em>
<b>Bold text</b>
<i>Italic text</i>
<u>Underlined text</u>
<s>Strikethrough text</s>
<em>Emphasized text</em>
<b>Bold text</b>
<i>Italic text</i>
<u>Underlined text</u>
<s>Strikethrough text</s>
Important text |
Emphasized text |
Bold text |
Italic text |
Underlined text |
Strikethrough text
✅ <strong>
and <em>
carry semantic meaning (importance and emphasis).
❌ <b>
and <i>
are purely visual (bold/italic without meaning).