Validating XHTML

by Joshua Unseth on May 6, 2008


The last couple days I’ve been reading a lot about Search Engine Optimization. Apparently it’s really important (just kidding, i know it’s important). I just began working on optimizing one of my sites. Over the next few weeks I’ll be watching traffic, and I’ll let you know whether my SEO attempts helped increase visits.

Anyhow, I spent the better part of the day just validating my sites HTML using the W3C validator. My most common mistakes: I didn’t close off my imgtags with a /, I didn’t have alttags on all of my images, and I used capitalized tags.

Frankly, I had no idea that <BR /> is invalid HTML and <br /> is valid HTML. Convention has always been something I didn’t concern myself with, but it may be more important than you think. Additionally, I had no idea that having an alt tag in an image would be as helpful as it (apparently) is. In my readings, adding tags to elements ends up skewing the content:links ratio toward more content on one’s page. This, of course, is good when it comes to getting indexed by search engines (search engines love content). Your image tags should look like the following:

<img alt="Some description goes here" src="URL" />

Leave a Comment

Notify me of followup comments via e-mail. You can also subscribe without commenting.