Yet another thing to check when doing SEO is that your site validates via the w3c validation checker. A site that is xHTML valid will recieve more frequent search engine crawls and more importantly, longer crawl times. I won’t bore you with further details about why validation is a good thing (it’s a huge subject), but if you must there is a great article about the subject right here. Creating a site to an xHTML valid standard encourages better coding practice and more semantic coding – making your site easier to crawl. You are also giving your site a betttr chance of displaying the same across multiple and future browsers.
Validating your site to at least xHTML Transaitional 1.0 (the test strict version, compared to xHTMl 1.0 Strict) is highly encouraged and is an area often ignored by developers. Below, I’ll quickly outline some of the common validation errors and how to easily fix them:
cannot generate system identifier for general entity X – 99% of the time this relates to errors with entity references such as ampersands in URLs. E.g. having an url like product.php?id=2&mode=view would result in this error as the ‘&’ wasn;t used within the url.
required attribute “alt” not specified – simply find the line number and add an alt tag for the image. The presence of an alt tag is required for both transitional and strict doc types.
XML Parsing Error: Opening and ending tag mismatch – Depending on how organised you are when coding this fix can take a matter of seconds or a lot longer. It relates to unclosed block level tags, such as a table or div. One plus point is that fixing such an error often results in several validation errors being fixed at once.
There is no attribute “HEIGHT” – xHTML does not allow for the presence of the height attributer. To resolve, add an inline style or better, specify the height within the css rule for that element.
NET-enabling start-tag requires SHORTTAG YES or document type does not allow element “META” here – caused by incorrect use of short tags for the page’s doctype. For example if you have specified an HTML doctype then you use use <br> instead of <br />.
ID ‘someDivname’ already defined – caused when you have used two dividers on the same page, with the same id. Solution, uses div class instead of div id if you need multiple dividers on one page.
Missing a required sub element of HEAD – almost definately caused by missing xHTML required tags from the head section. E.g. have you included a title tag (required in all HTML documents.