Website Validation: My Biggest Shock This Week

I’m just on the point of launching my web site services business, so this post from Eric at Web Services and Tools caught my eye.

Given that one of the services I’ll be offering is website design I figured it would be a good move to make sure my own sites were properly designed, and validated, in line with the W3C standards.

I was reasonably confident that I’d be OK, since my sites are deliberately simple and straightforward. I avoid scripts and Flash as far as possible, as well as weird and wonderful creative effects.

So I was pretty shocked when I ran my site through the online validator: 268 errors and 17 Warnings.


And some of the errors seemed to be incorrect.  For example it told me that there was no character set defined, but there was.  It was in the second line in the HEAD section.

(Forgive the use of CAPS – if I put these tag names in angled brackets, as they should be described, all the RSS feeds think they’re HTML tags and suppress them).

It also told me the “target” attribute wasn’t allowed (the way you can define where a link should open).

So I got on the phone to Eric to ask a few questions.

Turns out that one of the most important factors in getting your site correctly validated is getting the DOCTYPE declaration correct.  This tells browsers (and the validator) what coding you are using and, therefore, what standards to apply.

My DOCTYPE was wrong.

I also had a number of other genuine errors – for example neglecting to put ‘alt’ tags on all my images, incorrectly re-using div id’s, incorrectly using the CENTER tag and so on.

Eric was kind enough to find the correct DOCTYPE declaration for me (there are lots of them) and point out the correct tags I should be using and I got down to work.

The first page took an age to correct, but I did eventually get zero errors and zero warnings.  Woo Hoo – I got to put the W3C badge on that page.

Having done my first page, the remaining pages were much quicker and easier to do, and now all the pages on my new site comply with the standards.

Why should this be important?

Of most relevance to webmasters generally is that it will help to ensure your web pages render correctly in as many different browsers as possible.

I’m not making a blanket statement here quite deliberately.  Web standards are still evolving and many browsers in use today do not conform.  For example, it was only with IE 8 (the most recent version) that Microsoft’s Internet Explorer browser complied fully with the standards.  And Internet Explorer held as much as 80% of the browser market until recently!

So even if your websites comply with the W3C standards, your pages could still render incorrectly if they’re being viewed on a browser that doesn’t comply.

Of course, of most interest to me, given my new business, was the ability to state that my websites comply with industry standards.

Happily I can now say that they do.

What do you think?

Comments on this entry are closed.

  • Tony Lawrence Feb 8, 2009 @ 22:18

    It always makes me grin when people giving web site advice have pages that can’t pass W3C.

    Like you, I validate all my pages. Unfortunately, I have thousands of older pages and some of them don’t validate yet – I try to get a few of them every week but sometimes I get distracted by finding other problems and off I go..

    And sometimes errors creep in later. I use a CMS and sometimes I’ll make a global change that breaks 10,000 pages all at once.. fortunately you can also FIX those just as quickly, but it’s annoying when I don’t notice the problem for a few days.

    CSS remains a very annoying area. I don’t bother to even try to validate CSS because the browsers treat it so variably that it becomes very, very difficult. I’ve given up on some things related to Microsoft because it’s just too hard to cover all their glitches. If parts of my CSS “break” in Microsoft browsers, I just don’t care anymore! So few of my visitors use Microsoft browsers now anyway..

    Tony Lawrence´s last blog post..Programming the Turk?

    • WealthyDragon Feb 8, 2009 @ 22:47

      Hi Tony,

      Good to see you back! Breaking 10,000 pages at once… That would definitely freak me out..! 😀 But then my technical skills are several aeons below yours.

      The browsers used for viewing my sites vary enormously. On my travel site 78% of visits are IE users, but on this blog it’s only 32%. I guess that says that most people who are into working online steer clear of IE, whereas the others don’t care.

      I have to admit that I check my sites in FF and IE but don’t usually bother with the rest.



  • Tony Lawrence Feb 9, 2009 @ 23:03

    You definitely need to check with IE. Microsoft browsers have some strange quirks that can make a mess of your intentions.

    I sometimes forget to do that after a site wide change and it has bitten me. Sometimes I just don’t care: if some idiot is using IE 6 still (or worse!), that’s their problem – a lot more sites than mine are going to be broken for those people!

    But 7 and 8, well, I like to see that my pages at least mostly work with those..

    Tony Lawrence´s last blog post..Don’t ever change, baby

    • WealthyDragon Feb 10, 2009 @ 7:06

      There are plenty of IE 6 masochists around: 26.6% of my travel site visitors are still on 6.0 and I popped into a local coffee shop chain the other day to find they’re still using it too..!

      I only bother to check with IE 7 and 8 and I discovered on that visit to the coffee shop that my old blog theme was all over the place in IE 6. Luckily, most of my blog visitors are on FF – it’s only my travel site where the majority use IE. (But I did change my blog theme and this one is OK!)