Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Help with reading my header outline
October 26, 2014, 12:03 pm
rate this thread
I'm working with HTML validity for the first time and am having problems in
terpreting my header outline (http://imgur.com/iw9i010 ). As I understand,
the top level should be my <h1> tags, and subsequent levels would be <h2>,
<h3>, and so forth. If that is the case, then the outline indicates that "
The Seasons Samui" is tagged in both <h1> and <h2>. However a quick look at
my page source indicates that both instances of "The Seasons Samui" are ta
gged in <h1>. What exactly am I missing/misinterpreting here?
Thanks in advance.
--My site is http://theseasonssamui.com/
--I generated my header outline at http://validator.w3.org/nu/
--I realize there are additional errors in the outline (and my HTML in gene
ral). I am trying to address each one-by-one, but correctly reading the va
lidator output is my first task.
PS - For the future, is this an acceptable forum for such questions? If no
t, can someone recommend a more appropriate forum? I tried posting to the
HTML sub-Reddit, but didn't receive too much feedback.
Re: Help with reading my header outline
HTML5 was an "outline" concept, which is partly based on headings, and
the http://validator.w3.org/nu/ validator can generate a report that
shows the outline. Though interesting in principle, the outline is
mostly too theoretical and tends to cause confusion more than help
people; it has even be called "dangerouns fiction", on good grounds:
It's not that simple, and this is where the outline gets
Not really tagged. Instead, the outline shows the latter as being a
heading for a 2nd level major part (section). The reason is that it is
inside an <article> element. Such an element, mostly fictional in its
effects, is defined to open a new major part at a lower level of nesting
than its parent, and any <h1> inside it is treated as a heading for that
part, hence at the 2nd level. This is what the "outline algorithm" says;
what browsers do is something different.
As a warning from the validator says, you should use <h1> for top-level
headings only. It is not formally forbidden to have more than one <h1>
element per page, but mostly it is illogical. The site header should
hardly contain an <h1> element, since it is supposed to be used across
the site and be (mostly) the same for all pages, so it cannot logically
contain a heading for the *page*. In the special case of a main page,
you might think otherwise, but there is really no need and no reason to
use <h1> there when the page later contains a page heading proper.