.

Friday, April 2, 2010

Headings

Posted by devlevis | Friday, April 2, 2010 | Category: , , , , |

HTML has six predefined heading tags. Headings use tags containing the number
of the heading. The

tag specifies the highest (most important) level of
headings, while

specifies the lowest (least important) level of headings.As with most textual documents, HTML documents use larger fonts to specify
higher-level headings.
For example, consider the following example and its output,
shown in Figure :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Heading Tags</title>
</head>
<body>
<h1>Heading Level 1</h1>
<h2>Heading Level 2</h2>
<h3>Heading Level 3</h3>
<h4>Heading Level 4</h4>
<h5>Heading Level 5</h5>
<h6>Heading Level 6</h6>
<p>Normal body text.</p>
</body>
</html>

Each heading style acts like a paragraph tag, providing an automatic line break and
extra line spacing after the element. As you can see in Figure , the default spacing
after a heading is one line.
You can use heading tags to delimit a wide range of text. However, their default use is
to mark headings in a document, much like headings in a textual document. Also, like
most tags, you can use styles to customize the size and appearance of the heading tags.

For example, consider the following style code, which defines the first four
heading levels in relationship to the normal paragraph font

<style type-"text/css">
h1 { font-size: 18pt; font-family: Arial;
font-weight: bold; }
h2 { font-size: 16pt; font-family: Arial;
font-weight: bold; }
h3 { font-size: 14pt; font-family: Arial;
font-weight: bold; }
h4 { font-size: 12pt; font-family: Arial;
font-weight: bold; }
p { font-size: 12pt; font-family: Palatino;
font-weight: normal; }
</style>

Currently have 0 comments:


Leave a Reply