Lesson 4B - Headers

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.

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

Try it
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>
By now, your sample.htm file should look like this.

Lesson 4A Horizontal Lines   < <  PREVIOUS   Table of Contents NEXT  > >   Lesson 5 Lists

Developed with HTML-Kit
Sandersongs Web Tutorials
Contact the Webmasterwith comments.
©2024, by Bill Sanders, all rights reserved.
This domain had 3,520 different visits in the last 30 days.
http://www.sandersongs.com/HTMLcourse/Lesson04B.php
This page was last modified on our server on 11 Jul 2021
and last refreshed on our server at 11:12 pm, UTC
This file took 0.02562 seconds to process.