Quote:
Originally Posted by teedoff
Have a look at Specificity.
And btw, just so you know, there a 6 levels of heading tags. h1 through h6. You dont have to use h1 for every important heading or key title/phrase.
|
It is preferable to use h1 tags for your main headings, and h2 for sub-headings, etc. for:
Search Engine Optimization
Accessibility
Clarity
You can either give your various sections id numbers and target the headings within these:
Code:
#mainContent h1 { /* rules here */ }
or use class names for either the sections (preferred) or each heading:
Code:
.contentClass h1 { /* rules to apply to headings within sections with this class */ }
h1.headingClass { /* rules to apply to all heading 1's with this class */ }
To add a class to a div:
Code:
<div class="contentClass"><h1>My Main Heading</h1></div>