Keeping Everything Tidy
Published 8 years 11 months ago on June 5, 2006 — 4 min read
As a developer, you should realize the importance of writing valid markup at all times. This gives your projects a solid base to work from and helps to ensure document longevity. A question that has been on my mind for some time is whether or not other developers feel the same way. When on the Internet, I spend the majority of my free time browsing sites based on the topics of Web design, Web development, usability, accessibility, and other associated topics. Being that I’m a developer I am constantly looking under the hood of other sites and checking out how things are organized. One thing I am constantly surprised to find is the lack of valid code sprawled around the developer community.
Now I’m hoping that this topic isn’t taken the wrong way. I’m not trying to preach superiority by any means and I feel that I should make that clear. Proper markup has in a way become an obsession of mine, and because of that I greatly rely on HTML Validator, an excellent extension for Firefox. For those of you who aren’t familiar with the extension, I’ll include the authors description:
HTML Validator is a Mozilla extension that adds HTML validation inside Firefox and Mozilla. The number of errors of a HTML page is seen in the form of an icon in the status bar when browsing. The details of the errors are seen when looking the HTML source of the page.
I always take notice to the results shown to me by the HTML Validator, and more often than not, I’m compelled to view the page source and see what exactly isn’t up to snuff on a given site. The strange thing is, the majority of sites I constantly view have simple errors that we all forget to touch up from time to time. A missing
alt attribute, not properly closing an
input, and other simple forgetful things that would take 4.3 seconds to fix. It’s those mishaps that really gave so much value to the HTML Validator Firefox extension for me.
I have been addicted to this extension since I first installed it. It instantly shows whether or not the markup of the current apge is valid based on Tidy. When using this extension, you don’t have to submit the page source to the W3C’s Validator. I know that checking with the Validator is nothing to whine about, but this extension does take a step out of the process.
That Little Green Circle
I don’t absolutely rely on the extension to give my markup a passing grade. I simply use it as a quick glance as I’m developing to make sure I’m staying on track. If I see anything but that Green Circle, I check the source and fix any blunders right there on the spot. It seems to save me work in the long run. When I’m ready to put a project on display, I definitely run it through the W3C Validator to double check, and use that as the final ‘go ahead’.
HTML Tidy for Safari
Recently a new plugin for Safari has been released which can basically be referred to as a port of the HTML Validator Firefox extension. It is the Safari Tidy plugin. Personally, I haven’t run into another developer that primarily uses Safari as their browser of choice, but I’m sure there are some out there. It is great that a plugin such as this was developed specifically for those who do end up testing and developing while using Safari.
But It’s My CMS!
There are situations in which a sites CMS will create anchors using a malformed URI, not include an
alt attribute for an image, or produce any other piece of invalid code. There are many situations in which a CMS can wreak havoc on your markup. While not entirely the fault of the developer, perhaps a backend that is more aware of valid markup would be in order for future projects. Content Management Systems are becoming more comprehensive and aware of standards as time goes on and when written properly, can produce valid markup at all times.
An Unhealthy Obsession?
Is my markup OCD an unneeded stress I’ve put upon myself? Am I taking it too far when I wonder why a developer that has provided me inspiration has neglected to keep their markup Tidy? Personally I don’t think so — keeping your markup clean, organized, and valid is not a difficult task, especially for those leading the industry. It’s not that I look down upon any given site that has an error or two, it’s more that I get psyched when I see that Green Circle.