Quote:
Originally Posted by AndrewGSW
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>
|
Yes I know, which is why I was pointing out there are lesser heading tags to be used for things like blog posts titles and such. Obviously, its good SEP practice to use heading 1 tags for page content headings, but less important sections dont have to be h1 tags.