Text is the heart of the web, and HTML gives it shape with two everyday elements: headings and paragraphs. Used well, they make a page easy to scan for people and for search engines. Used carelessly, they quietly hurt both.
1Six levels of heading
HTML has six heading levels, from <h1> (most important) down to <h6> (least). Think of them like a document outline:
<h1>Cooking at Home</h1> (the page title — only one)
<h2>Breakfast</h2> (a major section)
<h3>Quick eggs</h3> (a sub-topic)
<h2>Lunch</h2><h1> per page — it is the page's main title — and never skip levels (don't jump from <h2> straight to <h4>). Screen readers let users jump between headings, so a clean order is a real kindness.- Headings run from
<h1>(most important) to<h6>(least). - Use exactly one
<h1>per page and never skip levels. - Choose a heading for its meaning, not its size — size is CSS's job.
2Paragraphs and line breaks
Body text goes in <p> (paragraph) elements. Each paragraph is a separate block with space around it. Pressing Enter in your code does not create a new paragraph — you must wrap each one in its own <p> tags.
For a soft line break within a paragraph — like lines of an address or a poem — use the void element <br>. But do not use a pile of <br> tags to fake spacing between paragraphs; that is what separate <p> elements are for.
- Each paragraph needs its own
<p>tags — pressing Enter in code does nothing. <br>makes a soft line break inside a paragraph.- Don't stack
<br>tags to space things out — use separate paragraphs.
★ Practical: a structured mini-article
Build a small article in any playground:
- One
<h1>with the article's title. - Two
<h2>sections, each followed by a<p>paragraph. - Inside one paragraph, use a
<br>for a single line break. - Check you used exactly one
<h1>and did not skip from h1 to h3.
Ready to test yourself?
Take the short quiz. Score 60% or more to mark this lesson complete.
Start the quiz →💡 Log in to save your progress and earn the certificate.