Lesson 2: Text & Headings
Lesson 02: Text & Headings
Learn how to organize text, create headings, and format words on your webpage.
HTML COURSE · LESSON 02
01. HTML Headings
Headings are used to organize content and introduce different sections of a webpage.
HTML has six heading levels, from <h1> to <h6>.
<h1>Main Heading</h1>
<h2>Section Heading</h2>
<h3>Smaller Heading</h3>
<h4>Heading Four</h4>
<h5>Heading Five</h5>
<h6>Heading Six</h6>
Main Heading
Section Heading
Smaller Heading
Heading Four
Heading Five
Heading Six
02. Paragraphs
Paragraphs are used for normal blocks of text. The HTML element for a paragraph is <p>.
<p>
Welcome to my website!
</p>
<p>
I am learning HTML.
</p>
Welcome to my website!
I am learning HTML.
03. Formatting Text
HTML has elements that change how text is presented or emphasize its meaning.
<strong>Important text</strong>
<em>Emphasized text</em>
<u>Underlined text</u>
<s>No longer relevant text</s>
<mark>Highlighted text</mark>
Important text
Emphasized text
Underlined text
No longer relevant text
Highlighted text
04. Line Breaks
The <br> element creates a line break without starting a new paragraph.
<p>
Hello!<br>
Welcome to HYPERLINK.
</p>
Hello!
Welcome to HYPERLINK.
05. Try It Yourself
What element creates the largest standard HTML heading?
Lesson Complete!
You now know how to create headings, paragraphs, emphasized text, and line breaks.
Next up: HTML Links and Images.