Technical SEO

Optimize Your HTML For Search Engines

SEO can be broken into two distinct areas – “onpage” factors and “off-page” factors. On-page factors include anything that you can affect on the page itself, such as the title tag, body copy, H1 heading tags, image “alt” attributes, etc.

Off-page factors encompass things that influence rankings but are not on the page itself, such as PageRank score and anchor text, better known by the layman as link text. When you are optimizing the on-page factors, you start with keyword research to identify the keyword markets that you should go after (as discussed in my “Keyword Sleuthing” article in the November issue). You craft prose targeted at those keyword markets (see my “Writing for the Search Engines” article in the December issue).

Keyword-rich prose isn’t enough though. In order to give your content its best shot at ‘singing’ to the search engines, you’ll need to optimize your HTML templates. Of course this all presumes that your ecommerce platform is friendly to search engine spiders (my “Avoid Complex URLs” article in last month’s issue). Here’s a quick guide on how to optimize your HTML, step-by-step:

Make sure each page can sing a unique song

The worst kinds of HTML templates have title tags and Meta data (such as the meta description) hard-coded so that they are the same across all pages that use that template. Make sure that your title tag, Meta description and H1 heading tag can be assigned on a per page basis, thus unique to the specific page in question.

Strip out extraneous HTML code

Superfluous code in your HTML negatively impacts your search engine rankings by pushing your good keyword rich copy further down the page thus lowering keyword prominence. Because the search engine spider looks at the HTML code rather than the rendered page as you see it in your web browser, elements in the HTML code that bloat the page up may lower your page’s keyword prominence. In addition, this “bloat” will negatively impact the user experience as it increases download time. As you know, Internet users are notoriously impatient.

Superfluous HTML includes HTML comments, JavaScript code that is “inline”, cascading style sheets (CSS) that are “inline,” and table tags used for layout. Not only are tables inefficient for layout; they also offer poor accessibility because “screen readers” (software used by visually impaired users to read each web page aloud) will read out all that table information to the user as if it were a tabular data such as a chart. So strip out all the comments, move the JavaScript’s and style sheets into separate “include” files (in the case of JavaScript, a .js file and with style sheets it is a .css file). So in effect you replace a many-line JavaScript or cascading style sheet with a oneline reference to an external file containing all that code.

Amplify the song that your content sings

Your content, when merged in with your HTML template, is what is served to the search engine spider. Your HTML template can squelch that song or it can amplify it. Above, we have already talked about ways that your HTML code can squelch the song. Now in order to amplify it, make sure that you include heading tags on your pages and utilize text navigation whenever possible instead of graphical navigation. For example, clickable buttons can be done as text but made to look graphical. Text links are much more effective than graphical links because the search engines take the anchor text that you have used and associate the words in the anchor text with the page that you are linking to. You will get a lift in your rankings for the keywords contained within those text links.

Not to worry

The Meta keywords tag doesn’t have much of a place nowadays in SEO, so you can safely leave them out of your HTML templates (unless your own site’s search engine uses them). A Meta robots tag with instructions to index and follow is unnecessary, as that is assumed, so leave that out as well. Image “alt” attributes used to be a lot more important than they are now. It seems nowadays that only when the image is also a link that the “alt” attribute is actually paid any attention to by the search engine. Taking all the above into account, you should end up with HTML templates that really enhance your search engine positions across all pages to which they are applied.

Stephan Spencer
Stephan Spencer
Bio


x