HTML provides for six different Header tags, H1-H6. The default for all headers is a block element with bold text. H1 has the largest font size and H6 the smallest.
<h1></h1> is the largest header.
<h2></h2>
<h3></h3> is the 'normal' size header.
<h4></h4>
<h5></h5>
<h6></h6> is the smallest header.
<h2></h2>
<h3></h3> is the 'normal' size header.
<h4></h4>
<h5></h5>
<h6></h6> is the smallest header.
As an example, the "Lesson 4B - Headers" header above is a <h3></h3> tag. Try it.
Add six headers to the bottom of your sample.htm page. Use all six tags shown above. Note the size of the fonts in each.
To horizontally align any header tag, add the align attribute. <h3 align="right">Right-aligned header</h3> and <h4 align="center">Center-aligned header</h4> produce what is shown below. Note that align="left" is the default.
Right-aligned header
Center-aligned header
- In this lesson, we learned about these HTML tags:
- <h1> and </h1>
- <h2> and </h2>
- <h3> and </h3>
- <h4> and </h4>
- <h5> and </h5> and
- <h6> and </h6>