Rethinking use of h2 tags in Core
SEO is a critical component of a succesful website. It isn't a hack or a black art of the nefarious. Instead, it's a vital business consideration. If your content is hard to find, no one is going to give it any notice.
Today I read a post that briefly tauts the use of h2 tags in Core as a way to organize the content of the page. The post is great and I recommend it to learn a solid technique in Drupal to maintain accessibility when you need to visually substitue images for content. But the one small comment about h2 tags caught my attention.
Just to lay my opinion out there, the current use of h2 tags in Drupal Core organizes a page well, but it does little to enhance SEO. Of course I'm describing out-of-the-box behavior. Drupal is completely themeable and these h2 tags can easily be altered to any other markup element in blocks.tpl.php. My goal is to improve the out-of-the-box SEO experience and reduce the burden on the themer.
H2 tags are meant to be used in content. They should be employed by content producers inside nodes. They should not be used to organize the structure of the basic page. Let's look at an example. Here are the h2 tags from my basic D7 install with a few blocks turned on
- Blog Posts
- Join our mailing list
- Who's online
- Stay connected
First, these words are generic. My page is not about News or Comments or Information. A web crawler will not find them useful in determining the meaning of this page and a potential hook to increase page rank is lost.
Second, these words are repetitive. As a crawler goes through a site and sees the same words on each page, their importance will decrease. In the world of determining meaning and importance through linguistic analysis, fewer instances of a term per document and fewer instances in the site as whole will increase their saliency because the most common words are the ones with the least unique meaning e.g. the, code, actually, today, best, answer, etc. to name just a few of thousands.
Page Rank is determined by evaluating several aspects of a page: the title tag, the URL, proper heading tag use, content analysis (keyword density), the ranking of the site, the page load time, quality reciprocal links (incoming and outgoing), the presence of a sitemap, and most likely more factors. At least to Google, meta keywords don't matter. There are many ways to hurt SEO. And though it's not a black art, it's still an art, because no one really knows the exact combination of factors and weights that the search engines use.
Drupal Core should be optimized for SEO out-of-the-box. And one aspect of this optimization is changing how h2 headings are used.
So what should Drupal use for secondary and aside content headings? h3 tags. Or better yet, h4 tags. Leave h1, h2 and h3 for content producers. Crawlers are said to ignore h3 through h5 tags, although opinions differ on the h3. It seems to straddle the line. In any case, these three tags can be used for document organization.
Drupal continues on its solid path of improvement, especially with the D7 release. There are many competing concerns in the construction of a web page and SEO must be one of the most pressing.