Semantic markup for Blogs and SEO

// October 6th, 2008 // Wordpress

Proper XHTML structure for blogs and for Google!

One key principle governs the markup on every page of your site:

Your goal is to describe each page to the search engines through the use of hierarchical XHTML tags (<title><h1><h2><h3> etc.) and to present them in a logical, meaningful order.

Title your pages and you will reap benefits

Page titles are the most important link between pure SEO and your human readers. Although their apparent impact on your site’s pages may appear minimal, their true impact in the search engines is undeniable. As you can see in the image below, Google pulls the contents of your <title> tag and links it as the most prominent piece of information in your search result.

Serve your post titles inside <h1> tags!

If logo egomania is the second most common problem I’ve seen in WordPress themes, then post titles being served inside <h2> tags (or worse) is far and away the biggest markup mistake.

I’ve hinted at it already, but it begs repeating here—the post title is the single most important piece of information you can serve to the search engines about an individual page. Ideally, your post title should give a clear indication of what people can expect to find within the content of a particular Web page, and as a result, it should be featured as prominently as possible within your markup.

Of course, the best way to do this is to serve your post title inside <h1> tags. Oh, and to be completely clear, you should only have one set of <h1> tags on any given Web page, so make them count! 

Use sub-headlines within posts to your advantage

Breaking up your posts into sub-sections is a great idea both stylistically and also for reader comprehension. The most common way to delineate these sub-sections is through the use of sub-headlines, but the problem is that there are an infinite number of ways you could go about doing this.

Fortunately, many WordPress themes come with pre-formatted styles for sub-headlines, and if you look, you’ll find that <h3> and <h4> tags are the most popular choices. Personally, I’ve been using <h3> tags for well over a year, but I hadn’t ever given it much thought until I decided to write this guide.

Really, if you serve your post title within <h1> tags, then it stands to reason that your sub-headlines ought to be highly-focused, relevant, and served inside <h2> tags. Under this setup, your sub-headlines facilitate your post title in the most powerful way possible while still maintaining the hierarchy of semantic markup.

If you’ve been in the habit of using <h3> tags for sub-headlines, it may be too much trouble to change at this point, and in all honesty, you probably wouldn’t see much difference anyway. The only time I would ever “highly recommend” a change like this is if you were trying to rank for a term that is ridiculously competitive.

Leave a Reply