Friday, 4 November 2011

HTML Headings

 

The purpose of heading element is to indicate different heading levels in a document. The tags are made up of an ‘h’ with a number following it. For example to specify a level heading you would write:

<h1>Level one heading</h1>

And level 2 heading would look like this:

<h2>Level two heading<.h2>

HTML includes six heading levels: <h1>, <h2>, <h3>, <h4>, <h5> and <h6>. Try typing the following HTML code to see how the six heading levels will display on a Web Browser.

<html>

<head>

<title>Title Element</title>

</head>

<body>

<h1>This is heading level one</h1>
<h2>This is heading level one</h2>
<h3>This is heading level one</h3>
<h4>This is heading level one</h4>
<h5>This is heading level one</h5>
<h5>This is heading level one</h6>

</body>

</html>

Type the above code on a Notepad and save as ‘heading.htm’ and open it in your Web Browser. The following figure shows the result. The test displays in a range of different sizes, from very large to quite small.

clip_image002

No comments:

Post a Comment