Valid XHTML

I've recently submitted my site to several various CSS galleries and I've noticed a trend. All submitted sites have to be Valid XHTML and CSS, otherwise they won't get accepted. But why? I'm all for web standards, heck, I even validate my own site, but why am I seeing it everywhere recently? And why does it have to be Valid XHTML only? What happened to HTML 4.0? That is still valid and acceptable last time I checked. It hasn't died, yet.

Validation trends are just that, trends. People showing they can validate a piece of code without knowing why. Why is it so important to get that green piece text saying, YES YOU'VE DONE IT! Ok it doesn't say exactly that, but you know what I mean. All the validation does is say that you've followed a certain set of rules correctly. A lot like the rules in language and grammar; knowing what punctuation to use, when to capitalise, when not to etc. You could still (just about) understand writing if they didn't adhere to these set of rules, but why should you have to?

Your browser determines what type of HTML a webpage is coded in by the use of the doctype tag. I won't explain in detail what this is because this is not a doc type article. But before you start coding a webpage, you need to make a decision about what type of HTML you are going to be using. Once you've decided, you'll need to put that at the very top of the web page you are creating.

Another difference between valid and invalid XHTML tags is that they are case sensitive, the tag, HTML, is not the same as the tag, html. All XHTML tags have to be in lowercase letters otherwise it throws a wobbly when validating and our survey says EH UH. But following these rules won't make your site look any different, or better for that matter. It doesn't really matter what type of HTML you decide to code your site in; only that if you do choose a type, make sure you do it properly.

The reason why it is important is because not all browsers view pages the same. They interpret how you code your site differently. And that is where validation comes in useful. If all sites followed one set of rules when creating a site, there is less chance of misinterpretation. Browsers could be made for one set of rules themselves and there wouldn't be need for messy hacks, work-a-rounds or edits when you're building your site. (I curse IE7) But unfortunately, life isn't like that. People like different things and it seems browsers aren't much different. Life is only valued by those who view it and web pages are only viewed (properly) by those who care to validate them properly.

To be honest though, I don't care if your site is validated or not. If it's ugly or has pop ups, I'm not going to view it anyway. It's not quantity, its quality. Or so I've been saying for years!

This article isn't a guide on how to validate your site or CSS, just trying to explain why people do.

Validate your webpage or validate your CSS?