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. Local Listings
    4. Phone number Schema that Google WMT blog talked about this week throwing HTML Validation error

    Phone number Schema that Google WMT blog talked about this week throwing HTML Validation error

    Local Listings
    9 2 504
    • 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.
    • RoxBrock
      RoxBrock last edited by

      My code looks like this:

      • 888.723.4617

      The HTML validation errors are these:

      Attribute contacttype not allowed on element span at this point.
      Attribute areaserved not allowed on element span at this point.
      Attribute contactoption not allowed on element span at this point.
      Attribute availablelanguage not allowed on element span at this point.

      Have I misread how to implement this schema or is html validation not up to speed and I should ignore for now?

      Link to blog Post...http://googlewebmastercentral.blogspot.com/2014/04/surfacing-your-businesss-contact-and.html?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+blogspot%2FamDG+%28Official+Google+Webmaster+Central+Blog%29

      Thanks!

      1 Reply Last reply Reply Quote 1
      • Whebb
        Whebb last edited by

        Hello,

        I believe it is valid under the HTML5 doctype, but not others. If you try and validate it under that doctype it clears validation. Generally I think you can ignore this issue for now as shouldn't cause any issues if it does not validate.

        1 Reply Last reply Reply Quote 1
        • RoxBrock
          RoxBrock last edited by

          It does not validate for html5, but thanks for your input.

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

            Hello,

            Are you sure you checked the HTML5 spec? This seems to validate for me and is only basic html5 with schema markup. It's possible you have not marked up the code properly.  Google provides some examples to assist with this. I believe you need to do the full markup too, not just certain parts. Hope that helps.

            RoxBrock 1 Reply Last reply Reply Quote 0
            • RoxBrock
              RoxBrock @Whebb last edited by

              I am positive I check with html4. I put the code in here so.... not sure what is up...Could the code put in for mobile look like it's in there twice and not validate?

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

                Well the document in question needs to be formatted in HTML5, otherwise it will not validate correctly. So if you run an HTML4 or XHTML page through the HTML5 validator it will not pass. You can also check here to see if the structured data is implemented correctly. Are you able to provide an example of the page you are trying to validate?

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

                  This page has the schema on the phone numbers in the top right and in the footer: http://m.mexpro.com/

                  Whebb 1 Reply Last reply Reply Quote 0
                  • Whebb
                    Whebb @RoxBrock last edited by

                    The rich snippet testing tool looks to show valid schema markup on the page you sent and the sample link I sent passed html5 validation. At this point looks like certain parts of the schema markup are not recognized by the validator. Good to know this is the case, thanks for sharing the link.

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

                      Thanks for double checking for me. I appreciate it!

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post
                      • For Google's Structured Data, should I change my listings from Product schema to Local Business schema?
                        stuartstein
                        stuartstein
                        0
                        3
                        161

                      • Different Phone Numbers in GMB/onsite
                        OrendaLtd
                        OrendaLtd
                        0
                        4
                        236

                      • Is it ok to use a mobile phone number for business listings?
                        MiriamEllis
                        MiriamEllis
                        0
                        5
                        120

                      • Would two telephone numbers on a website affect NAP consistency? One is the "actual" business number with Schema, the other is a call tracking number.
                        MiriamEllis
                        MiriamEllis
                        1
                        6
                        839

                      • 4 locations - 1 phone number - what to do?
                        coolhandluc
                        coolhandluc
                        0
                        3
                        280

                      • Help tracking phone number calls from Google Plus & Yahoo Local
                        MiriamEllis
                        MiriamEllis
                        1
                        3
                        710

                      • Google Places Multiple Phone Numbers
                        dsinger
                        dsinger
                        0
                        5
                        3.4k

                      • 2 phone numbers in our SERP snippet are incorrect. How do I fix it?
                        Davinia22
                        Davinia22
                        0
                        5
                        95

                      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