HTMLHTML · Lesson 04

Headings & Paragraphs

h1–h6, paragraph flow, line breaks and preformatted text.

Video tutorialTrack course · freeCodeCamp
Speed
Next lesson
Watch 00:00 · 1 checkpoints Watch on YouTube More on this topic
Transcript & captions
5/5

Headings run from <h1> (most important) to <h6>. Use exactly one <h1> per page and never skip levels just to get a smaller font — that is CSS's job.

htmlhtml
<h1>Page title</h1>
<h2>Section</h2>
<h3>Sub-section</h3>
<p>Paragraphs collapse extra spaces and newlines.</p>
<pre>Preformatted
  keeps   spacing</pre>
Try it yourself

Knowledge check

0/1 answered

How many <h1> elements should a page normally have?