Xdega wrote:granor wrote:Using h1 like title is nonsensical. why would we need 2 elements that do the same thing?
^^ this.
I would much rather the content of the page be described in the headers <head> than in the body of the page. The <h1>through <h6> should be used at the designers discretion.
- Code: Select all
<html>
<body>
<section>
<h1></h1>
<p></p>
<h2></h2>
<p></p>
<h3></h3>
<p></p>
</section>
</body>
</html>
should be valid. As should:
- Code: Select all
<html>
<body>
<section>
<h1></h1>
<p></p>
</section>
<section>
<h2></h2>
<p></p>
</section>
<section>
<h3></h3>
<p></p>
</section>
</body>
</html>
I also think that for documents that are not that rich in content that they require multiple uniquely styled headers, the <h1> tag should just be used for simplicity:
- Code: Select all
<html>
<body>
<section>
<h1></h1>
<p></p>
</section>
<section>
<h1></h1>
<p></p>
</section>
<section>
<h1></h1>
<p></p>
</section>
</body>
</html>
Don't take away that freedom. It's like locking everyone up in prison, because a few people commit crimes.
As I mentioned. Search engines, screen readers etc should focus on the documents headers <head> for content type and description.
They already do that to some degree, but they have to analyze the content as well, to make sense out of the page.
Screen readers will need to know about headings, and lists, to make it easer for users to navigate on the site.
Search engines will need to analyze page content for ranking purposes.
Your first example would not be valid, you have a section floating in thin air, with a bunch of headings in it. I'm not sure if this would trigger the old sectioning model in UAs, or if it would simply count as a single section, placed a little oddly.
Your second example is almost valid. What you have in your second example, is 3 subsections of body. You can easily style multiple h1s, it just requires some clever usage of css selectors, such as "element + element", and "element element", which would mean "select elements which comes after this element", and "select elements inside of element" respectively.
You may however consider using classes and ids, since it may be much easier in some situations. Especially to avoid overlapping declarations. Don't obsess about whether or not to include another class or id.