Lesson 34 of 55
HTMLText Formatting Tags
9 min
Course progress62%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 34 of 55
HTML9 min
Keep these ideas in mind as you work through the lesson.
<h1>Page Title</h1>
<h2>Section Heading</h2>
<h3>Sub‑section</h3>
Only one <h1> should appear per page; it represents the main topic. Subsequent headings build a logical hierarchy used by browsers, screen readers, and search engines.
<p>This is a paragraph. It automatically has margin before and after.</p>
<p>Another paragraph.</p>
<p>Line break within a paragraph using <br /> tag.</p>
Avoid using <br> for spacing; rely on CSS margins instead.
<hr />
Use <hr> to separate thematic sections. For visual lines, use CSS borders for more styling flexibility.
<blockquote> – For quoted text.<pre> – Preserves whitespace and uses a monospace font.<address> – Contact information for the author or site.Tip: Keep HTML focused on meaning; use CSS for all visual styling (spacing, borders, colors).