Headings
In the previous lesson, we learned how to create the HTML structure that we will need in every HTML document. In this lesson, we will look at various HTML elements that help us create the content of web pages. Since they form the visible content of the page, we will write them inside the body element.
In the editor, you will find the page skeleton from the previous lesson. This time, we will build a page about the domestic cat: the head already contains the meta element with the character set and the title element with the title Domestic Cat.
In this exercise, we will start creating headings. You already know h1 from the previous lesson, but HTML has six levels of headings, from h1 to h6 (h stands for heading and the number is the level):
<h1>Level 1 heading</h1>
<h2>Level 2 heading</h2>
<h3>Level 3 heading</h3>
<h4>Level 4 heading</h4>
<h5>Level 5 heading</h5>
<h6>Level 6 heading</h6>h1 is the main heading of the page. It says what the whole page is about, so a page normally has just one h1. h2 headings divide the page into sections, h3 headings divide those sections into smaller parts, and so on down to h6.
Browsers display h1 the largest and each lower level a little smaller. But choose the level of a heading by its importance, not by its size. If you want a heading to be bigger or smaller, you can change its size with CSS.
Instructions
In the body element, create an h1 element with the text Domestic Cat.
Below the h1 element from the previous instruction, create an h2 element with the text Description.
Below the h2 element from the previous instruction, create another h2 element with the text Physiology.
Start programming for free
1/8