On-Page Search Engine Optimization Techniques

Creating Search Engine Accessible HTML

The markup on your site should be clean, clear, and as limited as possible. Pull open the source code of a page on your site and check out how it looks, if it is a mess of HTML code you might want to trim that down or switch to a lighter markup specification such as with CSS. Again, here we worry about density and extraneous code could potentially hurt your keyword density.

Many believe you must have completely validated code as well or the search engines will penalize you. This is not true. The Search Engines are not markup grammar police, they care not if your site validates strict. However, clean, validated, accessable, cross browser compatible, quickly loading, markup is a very good thing because it makes your site more usable to more people and provides them with a better experience when using your site. This will cause people to enjoy your site more and make them more likely to link to your site or recommend it to others. So yes, there is value in having good clean CSS markup, as there is value in having a fast server to provide quick page loads.

So, through out your HTML markup, remember, less is more. If you can do a pure CSS design do it, and leave naught but tags in the page source itself, and move all style definitions to an external css file. Additionally if you use javascript also keep it in external files. This will not only speed up page loads through the use of browser caching, but also of course keep your keyword density in your source code as high as it can possibly be.

Spam Warning

There was an old technique of filling up HTML Comments (which are invisible on the rendered page) with keywords to rank better in search engines. Don't do this, if the search engines don't just block the keywords they'll penalize or ban your site for doing this. This is no different from putting in text the same color as the background, so called invisible text, to increase keyword density. Any technique that tries to add keywords to your page that users do not see, apart from the use of meta tags, is spam. Using any such technique risks penalties & bans.

How Spiders Read

Spiders read your source code from top to bottom, and content placed at the top tends to be given more credence than content at the bottom. Additionally some crawlers may stop reading pages after so many kilobytes. So you really need to prioritize your content.

Most websites have either a top horizontal, left, or right menu or all of the above and depending on how your structure your site, be it with HTML tables or with CSS, some of that content can end up at the top of your source code, some of it at the bottom. You will want to make sure what is at the top is what you want to be given the most notice.

What I recommend is making sure your menu is at the top. The simple reason is that no menu is likely to ever be long enough to prevent your content from atleast being partially spidered, but content can easily be long enough to prevent your menu from being crawled if the content is placed first in the source code. If your menu is not crawled a search engine will not be able to crawl your site as deeply and you will end up with less pages indexed. As such it is better to have 100% of your menu crawled even if it means that only 90%, 80%, or even 50% of your content on one page is indexed.

ALT & TITLE Attributes

Two key accessibility features that are part of the HTML specification are ALT attributes for images and TITLE attributes for links. The ALT attribute is meant to provide a description of an image for the blind or those with images turned off in their browser. The TITLE attribute is meant to provide a description of the linked-to page to give the browser more information before they click the link.

Both locations are prime places for the placement of keywords. However this does not mean that you want to stuff them with keywords, stuffing being the process of repeating keywords repeatedly in a nonsensical way. Rather instead you want to use them for their intended purpose, and just be very literal in your descriptions.

For a TITLE attribute a poor example would be "Click for more information." That is completely generic, does not provide good information to the browser, and helps you not at all with search engines. A far better approach would be "Information on Panoramic Photography" in which you eliminate unnecessary noise words (click for more) and add the literal prime keywords of the linked to page (panoramic photography).

For an ALT attribute, most often used with your site's logo, a poor example would be "Our Logo." Instead it would be best to more or less repeat what is in your <title> tags. For another image on the page, lets say within an article on panoramic photography, a bad example would be "A picture of a camera" whereas a good example would be "Panoramic Photography Camera with Wide Angle Lense" again because I have removed the noise words (a picture of) and added a more literal and complete description.

Neither the TITLE or the ALT attribute will provide a large benefit to your rankings, although the ALT attribute can make a noticeable difference in image search result sets. However they are relatively easy & straightforward to implement and you should use them for accessibility reasons alone.