Menu
Coddy logo textTech

Headings

Part of the Fundamentals section of Coddy's HTML journey — lesson 6 of 60.

You're probably not going to use only plain text on your website, right? If you want to add a title or section name, the best way is to use headings. There are six levels of headings, from <h1> (the most important) to <h6> (the least important). 

<h1>This is a main heading</h1>
<h2>This is a subheading</h2>
<h3>This is a sub-subheading</h3>

"Headings organize your content and make it easier for people and search engines to understand your page. Start with <h1> for the main title and use <h2> to <h6> for other sections."

challenge icon

Challenge

Easy

Create an HTML document with a main heading (<h1>) that says "Welcome to My Page" and a subheading (<h2>) that says "Introduction".

Check the hints for help!

Cheat sheet

HTML provides six levels of headings from <h1> (most important) to <h6> (least important):

<h1>This is a main heading</h1>
<h2>This is a subheading</h2>
<h3>This is a sub-subheading</h3>

Headings organize content and make it easier for people and search engines to understand your page. Start with <h1> for the main title and use <h2> to <h6> for other sections.

Try it yourself

<!DOCTYPE html>
<html>
    <body>
        <!-- Write code here -->
    </body>
</html>
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals