Thoughts on validation
Making your site validate may seem like the highest goal for newbies. Once they finally reach it, they consider themselves experts and think there's nothing left to learn. Well, okay not all people think that way but I've seen a lot of them who do. This is just my view on validating, you may even call it a rant.
What, you don't know what I'm talking about? You seriously don't know what validation
is? Can it be that you're one of the 1% of people who didn't stick the "Valid
something" on your page? Oh lord, you have no idea what you're missing.
But let me tell you.
Those who do know what W3C validation
service is, skip right to the point.
World Wide Web Consortium, those people who define standards for browser manufacturers and designers to follow, made some nice scripts which will tell you if your code is valid, and if it's not, what's wrong with it. You should definetly try it, because you'll get helpful information on how to write standard-compliant code. To try this free service yourself, follow these links:
Now you know the secret world has been trying to hide from you. Eventually, when you fix all your bad coding, you'll want everyone to know about it.
Now let's clear some myths you may have been led into believeing.
It does not make you a good designer
Once I stumbled upon a website where the girl bravely stated
Both my XHTML and my CSS will validate. If it looks bad, it is not my fault.
So what, it means it should look good? The only thing validator checks is that all tags are closed, nested correctly, all of the tags and attributes are allowed in the doctype you chose, and there's no proprietary attributes which are supported only by some browsers. The rest of it is entirely on you, and with an attitude like that I doubt you did your share properly.
To be sure your page looks good in all browsers, you must test it yourself, even if it means having 3-4 browsers installed on your computer for that purpose only. That's what good designers do.
It does not mean you don't have a tag soup
If your site validates and you use an amount of tables that overceeds
good taste, you're totally negating the whole
"W3C compliant"
thing. If you wrap your images in div-s just to give them
a fancy border and margins, if your headings look like
<p class="head">News and Updates</p>
instead of
<h1>News and Updates</h1>
your page might validate, but underneath it all it's still
crap. If you chose to be on the bright side and try to make your site
standard compliant, than make that extra effort and keep your
markup clean. Basically,
you should make use of provided tags instead of messing around with
tables, divs, spans and blank images
called spacers where there's no need to.
CSS can do some wonderful things for us.
It does not make your page accessible
To make your site accessible, you should ensure that in source code content comes before the sidebar offering extra information and navigation, or at least provide a hidden link to the content on top of your page. To hide something from the standard-compliant browsers, but still let it be read by screen-readers (software for blind users), use this CSS:
.invisible {position: absolute; top: -9999px;}
If you're wondering why I just haven't used the display: none property, my sources
claim this hides content from screen-readers also.
You should set images used for your design as backgrounds, instead of
inserting them as img tags.
You should use the headings as suggested in the paragraph above. Only this
way will your page be accessible to visually or in any other way impaired
people.
Validate your content, not layout
When you design a layout and validate it, you think it's all done. Then
you insert the content and stick Valid
HTML and Valid CSS
at the bottom of every single page without even checking your every single
page.
So what happens if I'm not impressed by that text alone and
decide to validate it myself? It fails. Your page is not valid XHTML 1.0
Strict
because you don't use entities,
because you link to external sites with target="_blank"...
Validate your content, otherwise you'll look ridiculos
claiming the site is valid but it's not.
You can be right even if it does not validate
With browsers acting different on some HTML and CSS properties, sometimes it's hard to make a template validate. Always keep on your mind that it's better for your website to be visible to most of your visitors, than to keep some validator-whores happy.