Continually Improving.... let us know how support@devdiamond.net Sign in | Sign up
home articles news blog forum  

 
 


 
Skip Navigation LinksHome > Article > Text Formatting :: Headings
Text Formatting :: Headings
Abstract :
Learn about the Headings of you text on an HTML page

Views : 1654
Published : Saturday, March 16, 2002
By
HyperLink

Avarage Rating :
Page Page 1 of 1

One of the earliest additions to HTML was the ability to have different levels of headings, just s you would have in an out line. The headings tags are used for this purpose. There are six levels of headings and each level had it's own tag pair. Each tag pair is the letter H followed by a number from 1 to 6 the code down demonstrates all six sizes for easy comparison. The source code for the picture is the code down, which follows the code.

<html>
<head>
<title>Heading Tag Demonstration</title>
</head>
<body>
<h1>This is Heading 1 (H1) Font</h1>
<h2>This is Heading 2 (H2) Font </h2>
<h3>This is Heading 3 (H3) Font </h3>
<h4>This is Heading 4 (H4) Font </h4>
<h5>This is Heading 5 (H5) Font </h5>
<h6>This is Heading 6 (H6) Font </h6>
</body>
</html>

Example

This is Heading 1 (H1) Font

This is Heading 2 (H2) Font

This is Heading 3 (H3) Font

This is Heading 4 (H4) Font

This is Heading 5 (H5) Font
This is Heading 6 (H6) Font

Notice that when the closing heading tag is used, it automatically adds a line break and adds some extra space between the lines.

One of the basic problems with the heading tags is that you have a little control over the appearance of the text in the user's browser. For instance, the browser in the picture defaults to Times New Roman font and there is no way to change it using the heading tags. In addition the size of the font are all relative and can be changed by the user. In Internet explorer, the base font size can be changed by selecting View à font and then picking the base size. Netscape has similar function in its Preference window.

For comparison, the picture shows the font Medium mode

Next to BLOCKQUOTE Tag -->



About Author

        Yasir Send Feedback
        Yasir is a .NET expert, with over 5 years experience in Microsoft Technologies, 8 years overall programming experience, he is the owner, founder & primary contributor of Minwar.com, and he also works as IT Director in the hospitality industry.