Headings & Paragraphs

Headings and paragraphs are two of the most common elements you'll use — together they give text content its structure.

Six levels of headings

HTML has six heading levels, <h1> through <h6>. <h1> is the most important — usually used once per page, for the main title — and each level down is a smaller, less important heading. Try changing some of the tags to h4, h5, or h6:

Try it yourself
Result

Paragraphs

The <p> element defines a paragraph of text. Browsers automatically add space above and below each one.

Try it yourself
Result

Line breaks and horizontal rules

If you just want a single line break without starting a new paragraph, use <br>. To add a horizontal divider line, use <hr>.

Try it yourself
Result