HTML · Lesson 3 of 9
Headings & paragraphs
h1–h6, paragraphs, line breaks and text formatting.
HTML has six heading levels, <h1> (most important) to <h6>. Use one <h1> per page for the main title and don't skip levels — screen readers and search engines use headings as an outline.
Paragraphs use <p>. The browser ignores extra spaces and line breaks in your code; use <br> for a forced line break and <hr> for a thematic break.
Formatting text
<strong> (important), <em> (emphasis), <mark> (highlight), <code> (code), <small>, <sub> and <sup>.
Try it yourself
Edit the code and press Run (or Ctrl/⌘ + Enter). Code runs only in your browser, in a sandbox.
Key points
- One <h1> per page.
- Don't pick headings for their size — style them with CSS.
- Whitespace in code collapses to one space.
Quick check
Which heading is the most important?
<h1> is the top-level heading; <h6> is the least important.
Practice task
Build a short résumé outline: one <h1> with your name, <h2> sections for Skills and Education, and a paragraph under each.
Interview corner
Why should you not skip heading levels?
Assistive technology and search engines read headings as an outline. Jumping from h1 to h4 breaks that structure.
<strong> vs <b>?
<strong> means the text is important (semantic); <b> only draws attention visually without extra meaning.
Further reading
Official documentation, linked for deeper study. These are outside sites; this lesson's text is our own.
Original lesson written by the InfoparkDaily team · © 2026 InfoparkDaily · Free to learn — no paid course or subscription.