HTML· LESSON 03

Text Basics

HTML gives you several ways to mark up text — headings, emphasis, line breaks, and notes to yourself that the browser ignores.

Headings and paragraphs

HTML has six levels of headings, <h1> through <h6>, used to show the structure of your content — <h1> is the most important, <h6> the least. Regular text goes in a <p> (paragraph) tag.

HTML
PREVIEW Live result

Result:

Main heading

A smaller heading

This is a regular paragraph of text.

Adding emphasis

To make text stand out, use <em> for emphasis and <strong> for importance. Both usually render as italic and bold, but they mean something different to the browser and to screen readers — not just a visual style.

HTML
PREVIEW Live result

Result:

You should really read this.

This step is required before continuing.

What does it mean?

<em> tells the browser “the reader should stress this word” — it’s read with vocal emphasis by screen readers, not just shown in italics. <strong> tells the browser “this is important,” and is read with more weight, not just shown in bold.

Underline

<u> underlines text.

HTML
PREVIEW Live result

Line breaks and comments

<br> forces a line break inside text, without starting a new paragraph. It’s self-closing — no </br> needed.

HTML
PREVIEW Live result

Result:

Roses are red
Violets are blue

Comments let you leave notes in your code that the browser completely ignores — useful for explaining tricky bits, or temporarily “turning off” a line without deleting it.

HTML
PREVIEW Live result

Try it yourself

Write a short paragraph about yourself. Make one word <em> and one word <strong>. Add a <br> to split a sentence onto two lines, and leave a comment above it explaining what you changed.