View Single Post
Old 05-09-2011, 06:20 PM   PM User | #3
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Quote:
Originally Posted by teedoff View Post
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>
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote