Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

W3 Validator


  • Please log in to reply
51 replies to this topic

#1 DevilsCharm

DevilsCharm

    Programming God

  • Just Joined
  • PipPipPipPipPipPip
  • 858 posts

Posted 16 June 2008 - 07:33 AM

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.
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 16 June 2008 - 07:42 AM

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.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 16 June 2008 - 07:57 AM

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).
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#4 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 17 June 2008 - 12:00 PM

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.
  • 0

#5 John

John

    CC Mentor

  • Moderator
  • 4450 posts
  • Location:New York, NY

Posted 17 June 2008 - 12:46 PM

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).
  • 0

#6 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 18 June 2008 - 04:38 AM

Yeah I read that bots find it easier. But I'm not sure about that...
  • 0

#7 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 18 June 2008 - 12:09 PM

...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. :)
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#8 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 18 June 2008 - 01:39 PM

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.
  • 0

#9 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 19 June 2008 - 08:01 AM

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.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#10 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 19 June 2008 - 09:22 AM

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

#11 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 19 June 2008 - 09:29 AM

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.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#12 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 19 June 2008 - 09:30 AM

Yeah.. maybe I'll take a look when I'll have some time.
  • 0




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download