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
- 1
In the
bodyelement, create anh1element with the textDomestic Cat. - 2
Below the
h1element from the previous instruction, create anh2element with the textDescription. - 3
Below the
h2element from the previous instruction, create anotherh2element with the textPhysiology.