The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Are W3C Validators too strict? Do errors create SEO problems?

    Are W3C Validators too strict? Do errors create SEO problems?

    Technical SEO Issues
    4 4 569
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • INCart
      INCart last edited by

      I ran a HTML markup validation tool (http://validator.w3.org) on a website. There were 140+ errors and 40+ warnings. IT says "W3C Validators are overly strict and would deny many modern constructs that browsers and search engines understand."

      What a browser can understand and display to visitors is one thing, but what search engines can read has everything to do with the code.

      I ask this: If the search engine crawler is reading thru the code and comes upon an error like this:

      …ext/javascript" src="javaScript/mainNavMenuTime-ios.js"> </script>');}
      The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element
      in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
      One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create
      cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer
      the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

      and this...

      <code class="input">…t("?");document.write('>');}</code>
      

      ✉

      The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

      One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).

      Does this mean that the crawlers don't know where the code ends and the body text begins; what it should be focusing on and not?

      1 Reply Last reply Reply Quote 0
      • Doc_Sheldon
        Doc_Sheldon last edited by

        Generally speaking, I would agree that validation is often too strict.

        Google seems to handle this well, however. In fact, I seem to recall Matt C. once saying that the VAST majority of websites don't validate. I think he may have been talking strictly about HTML, though.

        Validation isn't a ranking factor, of course, and most prevalent browsers will compensate for minor errors and render a page, regardless. So I really wouldn't be too concerned about validation just for validation's sake. As long as your pages render in most common browsers and neither page functionality nor user experience is adversely affected, I'd consider it a non-issue. As to whether a bot could be fooled into thinking the head had ended and the body had begun, I suppose it's possible, but I've never seen it happen, even with some absolutely horrible coding.

        1 Reply Last reply Reply Quote 3
        • danatanseo
          danatanseo last edited by

          I agree with Sheldon, and, just for perspective....try running http://www.google.com through the same w3c HTML validator. That should be an excellent illustration. A page with almost nothing on it, coded by the brilliant folks at Google still shows 23 errors and 4 warnings. I'd say not to obsess over this too much unless something is interfering with the rendering of the page or your page load speed.

          Hope that helps!

          Dana

          LesleyPaone 1 Reply Last reply Reply Quote 1
          • LesleyPaone
            LesleyPaone @danatanseo last edited by

            Google is a different case being run through the validator. I actually read an article on why google's site do not validate. The reason is that they send so much traffic, it actually saves them a good amount of money not closing tags that do not matter. Things like adding a self closing / to an img tag and the sorts.

            While I do not think that validation is a ranking factor, I wouldn't totally dismiss it. It make code easier to maintain, and it has actually gotten me jobs before. Clients have actually ran my site through a validator before and hired me.

            Plus funny little things work out too, someone tested my site on nibbler and it came back as one of the top 25 sites. I get a few hundred hits a day from it. I will take traffic any where I can get it.

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post
            • SEO problem: wrong language sitelinks
              0
              1
              64

            • Yoast SEO. After set up 404 error pages
              A_Fotografy
              A_Fotografy
              0
              3
              983

            • Is dash problem for seo?
              agsln
              agsln
              0
              8
              343

            • Site redesign. Possible SEO problems?
              skalfa
              skalfa
              0
              9
              151

            • Managed DNS potential SEO problems
              Resultify
              Resultify
              0
              2
              428

            • SEO problem if homepage is 2 folders deep?
              Dr-Pete
              Dr-Pete
              0
              4
              659

            • My home page 301 redirects - is this an SEO problem
              kchandler
              kchandler
              0
              3
              427

            • Wordpress Problems.. SEO-Yoast is Toast?
              smstv
              smstv
              0
              5
              1.9k

            Get started with Moz Pro!

            Unlock the power of advanced SEO tools and data-driven insights.

            Start my free trial
            Products
            • Moz Pro
            • Moz Local
            • Moz API
            • Moz Data
            • STAT
            • Product Updates
            Moz Solutions
            • SMB Solutions
            • Agency Solutions
            • Enterprise Solutions
            • Digital Marketers
            Free SEO Tools
            • Domain Authority Checker
            • Link Explorer
            • Keyword Explorer
            • Competitive Research
            • Brand Authority Checker
            • Local Citation Checker
            • MozBar Extension
            • MozCast
            Resources
            • Blog
            • SEO Learning Center
            • Help Hub
            • Beginner's Guide to SEO
            • How-to Guides
            • Moz Academy
            • API Docs
            About Moz
            • About
            • Team
            • Careers
            • Contact
            Why Moz
            • Case Studies
            • Testimonials
            Get Involved
            • Become an Affiliate
            • MozCon
            • Webinars
            • Practical Marketer Series
            • MozPod
            Connect with us

            Contact the Help team

            Join our newsletter
            Moz logo
            © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
            • Accessibility
            • Terms of Use
            • Privacy