[thelist] Correct use of H tags

Kevin B. O'Brien ahuka at ahuka.com
Sat Jun 22 08:21:01 CDT 2002

At 12:29 AM 6/22/2002 -0700, Joel Canfield said something remarkably like
(but somehow subtly different from):
> > Is there a correct way of using H tags on a page?  I'll
> > explain further...  The W3 html site uses one h1 tag for the
> > page/document title followed by one h2 tag followed by loads
> > of h3 tags.  If those h1 and h2 tags weren't there, would it
> > be correct to use loads of h1 tags (as they would be the
> > first instance on a h tag on the page), or is an h1 tag
> > supposed to be for a top page heading only?
>The technically fussy correct way to use <hx> is hierarchically, as you're
>saying. Headers imply structure and really ought to be used as you would the
>levels of an outline. So, if you only had one level deep, each heading would
>be <h1> all the way down the page. If you want it to *look* different
>(that's presentation, not structure) define usable/attractive/whatever
>styles for all your <hx> tags in your stylesheet.

I would say that there should only ever be one h1 tag per page, which
should describe the contents of the entire page, i.e. the page title. If
you have content one level deep through the page, that could be a series of
h2 tags to be correct.

The reason is the structure of the information. If an electronic search
process finds a key word in an h1 tag, it should be able to assume that the
entire page is relevant to that keyword, and assign the page a high
ranking. If the key word appears in an h2 tag, that should mean a major
section of the page is relevant, and so on. If the key word appears in a p
tag, but not in an h tag, that should imply the lowest degree of relevance.

And yes, to control the appearance of these tags, use stylesheets.

Kevin B. O'Brien         TANSTAAFL
ahuka at ahuka.com
"Always do right. This will gratify some people, and astonish the
rest." -- Mark Twain

Help fight SPAM. Join CAUCE. http://www.cauce.org/

More information about the thelist mailing list