headings and footers

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

It seems to me that headings (<h1>, et al.) should 'cover' all the text
beneath them, until the next heading, or until something indicates that
the coverage (scope) of the heading has ended.  (HTML has no mechanism for
the latter.)  Moreover, that's how (e.g.) Google uses them.[1]  So it
seems to me one of the following should be true (none of them *is* true
(unless maybe number (3) is -- does anyone know for certain?)):

(1)  There is a mechanism for ending the scope of a heading,

(2)  Authors should put a new heading above the footer (e.g.,
<address>-type info) of their pages to prevent that info from being
counted as part of the previous header's scope.

(3)  Authors should be allowed to use <Hn/> as a means of specifying that
the previous <Hn>'s scope has ended, and (e.g.) Google should understand
the page that way.


[1]  I have a small phonograhic-copyright symbol as a GIF in the footer of
one of my pages -- http://www.math.wustl.edu/~msh210/recoring.html -- and
Google Image Search, when it shows that image in a results list -- as in
http://google.com/images?q=msh210 -- shows the content of the <h1> above
it as the description of the image.  (Why it doesn't show the alt text, I
don't know.)

Michael Hamm                    It's not who you know, it's whom.
AM, Math, Wash. U. St. Louis                         Joan Rivers
msh210@math.wustl.edu                Fine print:
http://www.math.wustl.edu/~msh210/ ... legal.html

Re: headings and footers

Quoted text here. Click to load it

Only if that header is of equal or greater weight, an <h2> beneath an
<h1> does not "end" the scope of the <h1>.

Quoted text here. Click to load it


HTML was originally devised as a markup language for basic scientific
documents, it's usage for other purposes meant that content that doesn't
belong on a page is now being incorporated on many pages. Examples are
side bars with non page unique content, navigation etc. If this type of
"content pollution" precedes the page content's <h1> in the source then
the document outline remains intact.

If however these sections are coded after the page content's <h1> then
to preserve a correct document outline these sections ought to be
preceded by their own <h1>s.

Quoted text here. Click to load it

HTML 4 and thereby XHTML 1.x are limited to the current limited

IIRC both the XHTML 2 and the HTML5 proposals have redefined headers to
facilitate what is often referred to as "application" usage that web
pages are now widely used for.

Quoted text here. Click to load it

Google Image Search often ignores alt content. It attempts to index the
web as it is. For it to return relevant images to users based on a text
input it has to look at the surrounding text given that most of the
images on the world wild web have bad or no alt content.


Re: headings and footers

Quoted text here. Click to load it
Quoted text here. Click to load it

If what I think you mean is that the scope of a H* element should extend
throughout all elements beneath it until another H* and give weight to
those elements higher than the next lower H*. Is that correct?
Markup is not programming and the scope rules are very different.
Perhaps search engines see it differently, but right now, </H*> ends
that elements influence certainly as far as browsers are concerned. A SE
may very well give weight to the H* followup or not. As the majority of
sites are marked up illogically, what would be gained?
But then I could be talking out of my hat and will learn from further



Re: headings and footers

Michael Hamm wrote:

Quoted text here. Click to load it

I have on occasion tried markup along the lines of

<div class="section">
   <h2>First Section Heading</h2>
   <p>First section content</p>
   <div class="subsection">
     <h3>Subsection heading</h3>
     <p>Subsection content</p>
   <p>More first section content</p>
<div class="section">
   <h2>Second section heading</h2>
   <p>Second section content</p>

This was an attempt, among other things, to make it easier to identify
which heading applied to what. It also helped simplify styling with CSS.

What Google makes of it I have no idea.


Site Timeline