October 12th, 2008

Optimising HTML page structure for search engine optimisation

A lot of web interface developers design HTML pages without having any real sense of the impact that the structure of the HTML code can have on SEO. There are a few important factors to bear in mind with SEO-friendly HTML structure – most of them are just a case of following best practise for HTML design.

1. The title

This is the single most important item on a page in SEO terms, as it should include all the main SEO keywords that you want to associate with the page. This acts as your document’s declaration of the subject matter that it is concerned with – coded correctly it’ll also be what Google displays in any search results containing your page.

Your title should be shown in two places in the HTML document:

  • The <TITLE> tag in the <HEAD> section
  • The <H1> of the <BODY> section.

2. What about META tags?

It’s true to say that META tags are no as important as they used to be. The keywords META tag is now ignored by pretty much every significant search engine, largely because it has been so badly abused in the past by people stuffing it full of repetitive or irrelevant keywords.

The description META tag however is still important as it is often used by search engines to construct the description of your page in search engine results. It has no bearing on where the page appears in the results, but well-written page descriptions can help to attract more traffic to your site. Consider it an opportunity to market your content.

3. Seperate content from visual implementation

This has as much to do with web accessibility as SEO, but it’s worth killing two birds with one stone. HTML should be used to define the structure of your content, while any visual implementation should take place in a physically separate CSS file. Search engine spiders are interested in the content of your page, not the visual design.

4. Don’t rely on JavaScript

It is worth pointing out that search engines do not execute JavaScript on web pages. Any content that relies on JavaScript to render, such as maps or RSS feeds, will not be read by a search engine. Be particularly careful with hyperlinks here, as links that use JavaScript will not be read by search engines.

5. How much text?

This is a content issue rather than a technical design issue, but is worth mentioning. A decent ball-park to aim for is as follows:

Title

5-10 words is a good range to aim for because you will be able to get traffic from “long-tail” searches (i.e. search phrases containing four or more words). Much more than that and you start to dilute the value of the page – they won’t all show up in search engine results either.

Description

If your meta description is too short then search engines will ignore it and construct their own. Too long and it will be shortened by the results page. Aim for between 12 and 24 words.

Body copy

The key point about page copy is that it should be relevant to the title and add value in some way. Avoid overt use of boiler-plate as Google can detect standard text that has been repeated on every page and may even regard it as web spam. In general, anything less than 150 words is a waste of time, while more than 500 is pretty ideal.