Skip to content

HTML Headings, Paragraphs and Text Formatting (h1 to h6, strong, em)

NeedMyTools Academy

Sign in free to read the full lesson

Sign in or create a free account

Free forever. No card, no paywall.

Most of the web is text, and how you mark it up decides whether people can scan it, whether screen reader users can jump around it and whether search engines understand what the page is about. This lesson covers the elements you will use on every page: headings, paragraphs, line breaks and the small elements that give words meaning.

Quick answer

Use <h1> to <h6> for headings in order (one main h1, then h2 sections, h3 inside those), <p> for paragraphs, <strong> for importance and <em> for stress. Choose elements for meaning, not for size: size and colour are CSS jobs.

15 min read and practice · Content checked on 20 October 2026

In this lesson you will

  • Build a clear heading outline for any page
  • Choose between strong, em, b and i correctly
  • Show quotes, code and abbreviations with the right elements

Headings make the outline

HTML has six heading levels, <h1> to <h6>. They work like the outline of a report: h1 is the title of the page, h2 starts a main section, h3 a subsection inside it, and so on. Screen reader users often move through a page by headings, and many open a list of all headings first to decide where to go.

Do not skip levels to get a smaller font: going from h2 straight to h4 leaves a hole in the outline. If a heading looks too big, keep the right level and change its size with CSS. Most pages need one h1 that says what the page is about, matching its <title> in spirit.

Try it: A heading outline
Code
ResultUpdates as you type
Console
  1. Console messages, errors, form data and clicked links appear here.

Read only the headings: they should tell you the shape of the page without the paragraphs.

Sign in free to read the full lesson

You are reading the free preview. Create a free account (it takes one minute, no password) to unlock the rest of this lesson and track your progress.

Unlocks after sign-in:

  • 2 more sections with live code examples
  • Common mistakes to avoid
  • Hands-on coding exercise with automatic checks
  • Practice quiz and the graded lesson test
Sign in or create a free account

Free forever. No card, no paywall.

Questions people ask

Can a page have more than one h1?

HTML allows it, but the browser does not build a smarter outline from it, so screen reader users just hear several top-level headings. One h1 per page is the clear, widely recommended choice.

What is the difference between strong and b?

<strong> means the content is important. <b> only draws attention without adding importance, such as keywords in a summary. They look the same by default; the difference is what they tell software and readers.

Do headings help SEO?

Clear headings help search engines and people understand what each part of a page covers. They are not a trick: a heading stuffed with keywords helps nobody. Write headings that describe the section honestly.

How do I add a blank line between paragraphs?

Do not add one in HTML. Paragraphs already get a margin from the browser, and you control the exact space with the CSS margin property, which you learn in the CSS course.

How do I write the less-than sign in text without starting a tag?

Use the character reference &lt; for < and &amp; for &. So 5 &lt; 10 shows "5 < 10". In most other places, such as > in text, the plain character is fine.

Sources

Facts in this lesson were checked against these official pages on 20 October 2026.

Code examples stay in English and run in a sandbox on your device. If you spot a mistake, tell us through the contact page.