Forum Moderators: mack
I've been organizing my site map better, and using H3 and H4 tags for the section headings.
Some of these headings represent actual pages I'd like to link to, while others don't. Is it all right to make H headings links?
Also, is it OK to use them this way in the first place, inside a site map? Seems to me it's perfectly logical.
Hope *I'm* making some sense.
Think about an outline. There is only one "main topic" that is being outlined. But there can be any number of level 2 breakouts - or under that, level 3 and so on.
What you need is a hierarchy.
H1
---H2
------H3
------H3
---H2
------H3
---------H4
---H2
...and so on. You don't jump from H2 to H4 without an H3 in between and so on. However, the only tag that is limited in terms of numbers of uses is the big boy,
H1: "Sitemap of Widgets.com"
H2: Main navigation, sometimes linked, sometimes not, made look the same with CSS
P and BR: Individual pages and articles.
Best, W.
Read this carefully:
A heading element briefly describes the topic of the section it introduces
Note the "section it introduces" part – so even H1, as a heading ,introduces a section of the document and not the document itself (IMO, title rightfully should introduce a document).
In the specification there isn't a mention of any limitation for number of H1 tags in the document. Interesting note is this though:
Some people consider skipping heading levels to be bad practice. They accept H1 H2 H1 while they do not accept H1 H3 H1 since the heading level H2 is skipped.
W3C QA document [w3.org] doesn’t say anything about number of H1 tags in the doc either
Maybe all this time I have been wrongly thinking about H1 as a title for the "on-page" text. When you think about it, it makes sense even if you compare document structure to "off-line" paper.
..<title> Dogs and Cats </title>
....<H1>Dogs</H1>
.......<H2>Pit Bull</H2>
..........<H3> North American Pit Bull</H3>
......
.......<H2>Puddle</H2>
......
....<H1> Cats</H1>
.......<H2>Lion</H2>
.......<H2>House kitty</H2>
I run below code through W3C validation service and it passes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD>
<Title>My Title</Title>
</HEAD><BODY>
<H1> Hading 1-1 </H1>
something
<H2> Heading 2-1 </H2>
something else<H1> Heading 1-2 </H1>
second something
<H2> Heading 2-2 </H2>
second something else</BODY>
</HTML>
Any takers?
If a page is really about two topics, I think I'm better off to make it two different pages. But if there are two subtopics of one main topic, and that main topic is only implicitly understood rather than explict -- then I try to explicitly create the main topic as my H1, and mke the two subtopics H2.
[edited by: tedster at 6:44 pm (utc) on Oct. 14, 2006]
My concern with using H tags for the main sections of my sitemap was just that some of the H tags would have referred just to individual page links, with no list of page links below them. Something like this (it's the last 3 lines I'm worried about, as they don't seem like a proper use of "heading" tags, since they don't "head" anything):
<h1>Widgets</h1>
<h2>S-shaped</h2>
<h3>Foam</h3>
Red
Blue
Purple
<h3>Rubber</h3>
Lilac
Chartreuse
Lemon
<h2>Spherical</h2>
<h3>Foam</h3>
Indigo
Puce
<h3>Steel</h3>
<h3>Copper></h3>
<h3>Fossil Ivory</h3>
<h1>Widgets</h1>
--<h2>S-shaped</h2>
---------<h3>Foam</h3>
----------------Red
----------------Blue
----------------Purple
---------<h3>Rubber</h3>
----------------Lilac
----------------Chartreuse
----------------Lemon
--<h2>Spherical</h2>
---------<h3>Foam</h3>
----------------Indigo
----------------Puce
---------<h3>Steel</h3>
---------<h3>Copper></h3>
---------<h3>Fossil Ivory</h3>