Firstly, I tend to go H1 -> H2 -> H3 as that's semantically correct if you think about it. I'm not actually sure what common consensus is; but using a h2 without a h1 on the page doesn't to my knowledge trip W3C validation.
As for search engines, I've heard people say that Google will treat your heading tags with different priority, but Google state otherwise; if the content is good then Google will still process it just fine.
http://www.youtube.com/watch?v=iR5itZlq8sk
Secondly, you can have multiple H tags of the same type on a page, they are simply there to distinguish headings from paragraph (or other) content.
Thirdly, an answer to your problem:
Stylesheets cascade; hence the name. So you can do something like this:
HTML Code:
<div class="page">
<div class="homecontent">
<h1>My Homepage</h1>
<p>
Welcome to my website, blah blah blah.
</p>
</div>
</div>
This would be for the homepage, note that you have a class called "homecontent" that encapsulates the actual content itself, which is encapsulated by a page class.
The page class would be your main "content" wrapper, the homecontent class would be the wrapper for your content on that page (which could apply styles or could simply serve as a hook).
Then for example, your about page:
HTML Code:
<div class="page">
<div class="aboutcontent">
<h1>About Us</h1>
<p>
About my company, blah blah blah
</p>
</div>
</div>
On this page your content wrapper is called "aboutcontent"
Now in your CSS you can do this:
HTML Code:
.page .homecontent h1
{
... styles for the h1 tag, which will only be applied to h1 tags that are nested in a flow of .page -> .homecontent ...
}
.page .aboutcontent h1
{
... styles for the h1 tag, which will only be applied to h1 tags that are nested in a flow of .page -> .aboutcontent ...
}
So you can define your style classes in a hierarchy; so only tags that match the hierarchy are affected, while the two definitions above are for the same tag (h1), they exist in a different structure so are different; allowing you to apply multiple styles to the same tag within different scenarios.
Bookmarks