WordPress.org

Ready to get started?Download WordPress

Forums

Should I validate? Why? (9 posts)

  1. Evrviglnt
    Member
    Posted 7 years ago #

    v 2.1.2

    I read about a guy validating his site - sounded important. Should I do it for my new site?

  2. whooami
    Member
    Posted 7 years ago #

    yes you should.

    http://validator.w3.org/docs/why.html

    In addition to what the W3C says, it's a no-brainer that you will end up here asking for help with something. Once just about anyone clicks through a link you provide back to your blog to see your problem, thats apt to be the first thing they check -- your validation.

    If it's not valid, that, accordingly so, is going to be the first thing they suggest.

    Th reasoning behind that is simple -- valid pages ****will usually**** display the nearly the same in IE and FF, and ***usually*** any differences are minor and CSS related.

    There are exceptions to that rule, of course.

    ---------

    This is an excellent example of why:

    http://wordpress.org/support/topic/112040?replies=3

  3. dwzemens
    Member
    Posted 7 years ago #

    Yes. Because it's the right way to code.

  4. slodaddy
    Member
    Posted 7 years ago #

    But what do I do when the validation errors are caused by a banner that I'm not permitted to modify, or a plugin that I happen to think is too important to dispose of?

  5. Eric Amundson
    Volunteer Moderator
    Posted 7 years ago #

    slodaddy,

    Although it's always a goal of mine to make every page validate and I'm quite obsessive about it at times, you really need to weigh the benefits sometimes.

    As you mention, some plugins, embedded adverts, and other items can cause validation errors. Personally, I always try to hunt down a fix, but sometimes, it's not feasible financially or time-wise to make everything validate 100%. I have found a few plugins that are fixable with minor changes to includes or script files, but it takes time to hunt these down.

    I've created sites for customers that require a certain proprietary code, such as a shopping cart plugin, that just churns out invalid code. Or, I also had this problem using Yahoo's Store for another customer. It's close, but won't validate 100%.

    Still, these sites rank well in search engines and accomplish their missions, so since the few errors don'tbreak the site or grossly effect usability, it's acceptable to us.

    I usually look closely at the errors or warnings and see how critical they are.

    Hope that helps

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    But what do I do when the validation errors are caused by a banner that I'm not permitted to modify, or a plugin that I happen to think is too important to dispose of?

    a) Banners you're not permitted to modify usually are fairly simple affairs that will validate without issue for XHTML 1.0 Transitional. Especially when they are javascript based or something to that effect. If it really doesn't validate, then consider why. If it's as simple as doing something like using a deprecated attribute, then consider modifying it anyway. Unless somebody is actually looking at the source of your page, they'll never notice. And most of the time, they likely won't care anyway. A lot of banner ads say not to modify the code, but what they're really concerned about is fraudulent behavior. If it doesn't change the way the code displays, they'll likely not care. And it's unlikely they'll check unless they suspect fraud.

    b) Plugins that don't validate should be modified to validate and the fact should be brought to the attention of the plugin author, if they are available.

    I try to validate all my pages to XHTML 1.1. Sometimes that's not particularly easy, but thus far I've always found it possible to do without sacrificing anything. Heck, the only reason I still serve pages as text/html (instead of application/xhtml+xml) is because IE7 is still broken in that respect.

    The biggest reason to validate your code is that doing so forces you to *look* at your code, which is something a lot of web designers do not actually do too much. It makes you a better designer and developer to know what's going on at the low level of things.

  7. Eric Amundson
    Volunteer Moderator
    Posted 7 years ago #

    The biggest reason to validate your code is that doing so forces you to *look* at your code, which is something a lot of web designers do not actually do too much. It makes you a better designer and developer to know what's going on at the low level of things.

    That's a great point Otto. We need to all get in better touch with our inner coder. :)

    Constant code viewing and validation has also made me much more conscious of good semantic markup practices.

  8. slodaddy
    Member
    Posted 7 years ago #

    Do search engines draw any distinction between minor errors and serious ones? And, assuming meta information is in order, how severe is the penalty for a site with a few minor errors as opposed to a site with no errors? Thank you guys for your responses.

  9. whooami
    Member
    Posted 7 years ago #

    >>> Do search engines draw any distinction between minor errors and serious ones?

    No but the people behind the browsers do -- especially if the site appears to be broke.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags