If you already know how to create various sized headlines in HTML, you can skip this lesson.
One very easy way to dress up a web page is by the use of headlines. There are six sizes of headlines available in HTML, and they are designated by tag pairs (from smallest size type to largest):
<H6> (opening) & </H6> (closing); [smallest]
<H5> (opening) & </H5> (closing)
<H4> (opening) & </H4> (closing);
<H3> (opening) & </H3> (closing);
<H2> (opening) & </H2> (closing);
<H1> (opening) & </H1> (closing); [largest]
HTML has two types of tags, standalone, and pairs. The headline is an example of a tag pair, because you normally would use both an opening and closing tag when using this feature. When you want to begin a headline in your text, your insert the opening tag, then insert the text you want for the headline, and finally insert the closing tag. If this is confusing to you, you may have to re-read the lesson on The Role of HTML Tags in an earlier chapter.
Let's see how we can dress up our "Hello World" document, while demonstarting the use of headlines; we'll end the demonstration by printing "normal" text, so that you can compare it to headlines:
<H1> Hello Web World! (H1) </H1> <H2> Hello Web World! (H2) </H2> <H3> Hello Web World! (H3) </H3> <H4> Hello Web World! (H4) </H4> <H5> Hello Web World! (H5) </H5> <H6> Hello Web World! (H6) </H6> Hello Web World! (normal text)
Notice also that by closing a headline, an double end-of-line action is asserted automatically (like starting a new paragraph).
By the way, in case you didn't notice, we've failed to show the HTML skeleton in our source code (you know, the html, head, title, and body tags). From now on, we'll only show the relevant fragment of the HTML source code that illustrates our current focus. But in a real document, you would still need the skeleton code. (who wants to look at skeletons, anyway?)