Jump to content

W3 Validator

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
51 replies to this topic

#1
DevilsCharm

DevilsCharm

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 884 posts
I'm sure many of you have heard of the W3C Markup Validation Service, located here:

The W3C Markup Validation Service

Does it really matter if your code is invalid? I've tried many websites and the only one that passed perfectly was w3.org (that would have been hilarious if it had failed). Even Google had 22 errors! So I just think it's stupid.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
One of my goals on the websites that I work on is to steadily improve their standards compliance. You can have invalid code that works, but I'd rather do a little more work and get it done the right way. It's kind of like the difference between doing database work right vs using a "hack", the hack can bite you in the rear end later on.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
I've got so used to it that I automatically write good code now. It's definitely worth looking into, unless it's flagging the error up as something stupid (like my 'strange characters').

In general, aim for as small a number of errors as possible - most of them are just syntax errors, which you should immediately correct (things like forgetting to close tags, missing attributes, no doctype blah blah).
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#4
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
It doesn't actually matter. But if you make your websites valid, it is most probably that your site will be displayed the same on all the browsers.

But yeah it is a good thing to do, having it all valid.

#5
John

John

    Writes binary right handed and hex left handed

  • Moderators
  • 6,321 posts
As everyone else has said it doesn't matter. However there are benefits - adhering to a standard will improve code readability, browsers will parse the page better (with less cross-browser issues), and I've even heard it helps SEO (bots find it easier to crawl).

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Yeah I read that bots find it easier. But I'm not sure about that...

#7
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts

TcM said:

...if you make your websites valid, it is most probably that your site will be displayed the same on all the browsers.
This is rarely my experience. Even with good code, IE displays it badly. Therefore, extra code has to be written to cope with it's quirks.

And FindItGlobally.com - Business Directory doesn't pass validation... but Home - Xav's Net Site does. :)
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#8
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
No, that website is still under construction.

That website is way more complicated than yours, it uses TPL files and what not, It is very hard to validate it, I'm not planning to validate it in the near future.

#9
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
My website's still under construction as well. :)

You only have 7 errors - no doctype, a few overlapping tags, some XHTML tags nested within the HTML, and a missing alt attribute. You could easily correct them.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#10
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Wow.. that makes me a pro. I didn't try to validate it, and it got only 7 errors :)

#11
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
But the errors are serious - I think you've overlapped some tags. And that alt attribute is so easy to add - just type alt="" and you're done. Copy a doctype from the net and you're pretty much valid.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#12
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Yeah.. maybe I'll take a look when I'll have some time.