I am going to steal a note from Phil’s recent blog articles, and do my own it’s a love hate thing. Only I am going to talk about something that I purely hate:
Ignorance OF DTDs
Not so much the numerous Document Type Declarations (DTDs) that exist (and there are many of them), but the fact that no one adheres to them. DTDs are guidelines that tell whatever is processing the HTML you have written (usually your web browser) what standard it is written to, and how to process this information. It provides a machine readable language that specifies the legal structure, elements and attributes of the HTML type that the page is written in. These DTDs are provided by the World Wide Web Consortium (W3C).
You will probably hear people now shouting “validating to a W3C HTML standard doesn’t affect your SERPs,” and to them I will say “hah,” and then largely agree. While I don’t think that validating a site is essential in SEO, what I do feel is important is that the HTML/XHTML you are writing is clean and concise. All too often sites arrive on my desk that use the <font> tag as if it was the most amazing thing ever. Instead of removing styling to CSS from the html itself, every single sentence is wrapped in a font tag, sometimes even two or three, each one with one setting, so instead of sticking it all in an external style sheet, you end up with something like:
<font face=”Arial, Helvetica, sans-serif”><font color=”#00FF99″><font size=”2″>Hello World</font></font></font>
And it goes on for every single line of text in the entire site. Appalling. Since I like lists, here are a few reasons why this is a bad line of html:
Size – If you had a page with a lot of text, imagine the size of the page, every sentence has that jumble of font tags added on. It may not seem like much, but when you have a large site with a lot of visitors, it can start adding up to a lot of wasted bandwidth.
Code Readability – Imagine that someone who has never looked at the HTML of your site before (ie me) is suddenly asked to change something as the developers who wrote the site are not available at the moment. I am going to waste a lot of time trying to work out what you did, and then probably even more time complaining to Phil or Nathan about the way it was written.
Changeability – Imagine it is decided that to improve the look of your site, half of the pages are going to be changed to a different size font, along with a different colour, oh and while you are at it, we would like to have some other text changed. Good luck to you is all I can say. Instead of changing a couple of CSS tags, you are now in tag soup. Who knows how many font tags you have to change, and guess what – find and replace wont work because some of the tags are staying the same.
This is but one example of some of the HTML travesties that exist and that I run across on a daily basis.
One of the things that we do as part of the search engine optimisation process is to make sure that the site validates and that the HTML code is as nice as we can make it. While as I said before, it is not going to be a major hurdle to attaining decent SERPs, it is one of those things that can have some effect, and is always worth fixing. It also has many other added benefits, from making it more likely that your site appears the same in all browsers, to making the code easier to maintain. There is no downside to adhering to these W3C standards.
At the moment I hate the lack of use and knowledge of DTDs, and wish that every person who ever writes a web site knows and follows these standards. However, things are never going to suddenly change like that, and so all I can ask is please at least make your code readable.
James Smith
SEO Programmer