I am trying to write semantically correct code. I really am, but I am also trying to be practical. Maybe I still don’t have as much f the hang of this as I’d like to think, but sometimes the two goals seem to conflict.
I a few general questions for the semantics gurus of this forum.
*Given that we have the following information and in this order ( a generalization of information on most documents i’ve seen
HEADER:
-> Name of Site
-> Brand or general statement (optional)
-> Navigational items
CONTENT:
-> Main Story ( Main Content)
->Subsections of main Content
->Secondary Content
->Subsections of Secondary Content
->related links ( optional)
FOOTER:
->Any number Terciary ( of footer content)
-> Navigational items ( repeat from head)
->contacts
->credits
- given navigation will be most likely coded as a list ( ul, ol, dl).
what are your opinios on:
-
Multiple H1 tags in one document, specifically : H1-> Name of Site, and H1–> Main Story
-
- Given also that I have read debates in this forum saying that you shouldn’t skip headers… H? for ->Subsections of main Content, ->Secondary Content, ->Subsections of Secondary Content. For exp. assume the main story is long and has… 3 sub heads thought itself ( for the sake of simplicity all three subheads have the same importance); there are 4 secondary blocks of contents and each has a subhead with in it… ( I mean if I have the main content as H1, and any sub sections within that story as H2, it would seem confusing to make the sub content H3 as the sub content doesn’t belong to the sub stories of the main content. … and so forth. Using H1 Main content and h2 for secondary content and h3 or even h3 and h4 respectively would have me skipping headers…
- Given also that I have read debates in this forum saying that you shouldn’t skip headers… H? for ->Subsections of main Content, ->Secondary Content, ->Subsections of Secondary Content. For exp. assume the main story is long and has… 3 sub heads thought itself ( for the sake of simplicity all three subheads have the same importance); there are 4 secondary blocks of contents and each has a subhead with in it… ( I mean if I have the main content as H1, and any sub sections within that story as H2, it would seem confusing to make the sub content H3 as the sub content doesn’t belong to the sub stories of the main content. … and so forth. Using H1 Main content and h2 for secondary content and h3 or even h3 and h4 respectively would have me skipping headers…
-
Assuming we also wanted to give a header to-> Navigational items and/or ->related links… again this would be the problem of skipped heads being logically necessary. I normally think of H5 / H6; I would do this even if the last headers was something like an h3. The reasoning behind this is that navigation or even related link do not actually belong to the content /sub content. Again I could be totally off…
-
Alternatively, and somewhat off-topic, suppose I don’t use a header to label my navigation-lists. Would it still be semantically correct if I used inline-text at the UL level:( I know I should put Hxs or any other block element at the block level, but anonymous text and inline- is ok, right?)
<ul> <b> This are Nav links</b><span class=“skipNav”>Skip Nav</span>
<li><a href=#“>Link</a><li>
<li><a href=#”>Link</a><li>
<li><a href=#“>Link</a><li>
<li><a href=#”>Link</a><li>
</ul>
thank’s all for your knowledge and opinions…