HTML and CSS Reference
In-Depth Information
he level-one heading h1 is the highest or most signiicant level heading,
and h6 is the least signiicant. It is customary to put a level 1 heading as the
irst element in the body of the home page to serve as the page's internal title.
Headings should be used in their natural hierarchical order, as in an outline.
However, it is perfectly all right to skip heading levels, following an h1 element
with an h3 , for example.
here another good reason why every web page should have one and only
one level-one heading somewhere near the top of the page: It is the most
important element that search robots look for ater the window title. Try not
to break this rule. Even though it might seem that having a level-one heading
would hurt your page design, you can still have one at the top of the page by
making it invisible to humans with the CSS display property:
<h1 style="display: none;"> ... </h1>
Example 2.9 is an HTML page illustrating the six diferent heading levels.
Figure 2.9 shows how this looks in a browser.
Example 2.9: HTML heading elements
<!DOCTYPE html>
<html>
<head>
<title>Example 2.9</title>
<style type="text/css">
body { text-align: center; }
</style>
</head>
<body>
<h1> Level 1 Heading </h1>
<h2> Level 2 Heading </h2>
<h3> Level 3 Heading </h3>
<h4> Level 4 Heading </h4>
<h5> Level 5 Heading </h5>
<h6> Level 6 Heading </h6>
</body>
<html>
 
 
Search WWH ::




Custom Search