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. Intermediate & Advanced SEO
    4. Adding Meta Languange tag to xhtml site - coding help needed

    Adding Meta Languange tag to xhtml site - coding help needed

    Intermediate & Advanced SEO
    9 4 2.7k
    • 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.
    • mlm12
      mlm12 last edited by

      I've had my site dinged by Google and feel it's likely several quality issues and I'm hunting down these issues.

      One of Bing's Webmaster SEO tools said my xhtml pages (which were built in 2007) are missing Meta Language and suggested adding tag in the   or on the html tag.

      Wanting to "not mess anything up" and validate correctly, I read in **W3C's site and it said: ** "Always add a lang attribute to the html tag to set the default language of your page. If this is XHTML 1.x you should also use the xml:lang attribute (with the same value).  Do not use the meta element with http-equiv set to Content-Language."

      My current html leads like:

      QUESTION:
      I'm confused on how to add the Meta Language to my website given my current coding as I"m not a coder.

      Can you suggest if I should add this content-language info, and if so, what is the best way to do so, considering valid w3c markup for my document type?

      Thank you!!!
      Michelle

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

        This is likely what you are looking for, but I don't think this is causing you any SEO problems.

        mlm12 1 Reply Last reply Reply Quote 0
        • mlm12
          mlm12 @GeorgeAndrews last edited by

          Hi George,
          Thanks for your prompt reply - and I agree - I'm sure this isn't a big factor, but when finding reports saying things are "wrong" - I'm trying to fix them for overall improvement.

          I noticed w3c says: Always add a lang attribute to the html tag to set the default language of your page. If this is XHTML 1.x you should also use the xml:lang attribute (with the same value).

          So, is it best practice to add it (xml:lang) to this tag you suggested (is applicable to my document)?
          <html xmlns="http://www.w3.org/1999/xhtml" lang="en">

          And is "en" preferred over "ll-cc"?

          Thanks again,
          Michelle

          john4math GeorgeAndrews mlm12 5 Replies Last reply Reply Quote 0
          • john4math
            john4math @mlm12 last edited by

            The Bing Webmaster Central article where they discuss how to set the language for your pages is here.

            1 Reply Last reply Reply Quote 1
            • GeorgeAndrews
              GeorgeAndrews @mlm12 last edited by

              Hi Michelle, "ll-cc" stands for "language-countrycode". So in the case of English, you can use "en-us" for English United States or "en-gb" for British English. I don't believe case matters (I have seen "en-US" and "en-GB" used too).

              For your question, yes you can use:

              You could also use:

              Either one will work fine :). Which language are you targeting?

              Here is some more reading from w3.org that seems more up-to-date, though I think you would be fine using one of the above methods.

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

                At least with Google, I doubt it makes a difference unless there are multiple languages on a page. If you use Chrome you'll see it auto-detects the language and offers to translate. It may only rank the page in a specific country or locale though. If you're aiming at Spanish speakers in the UK, it may be a little different.

                1 Reply Last reply Reply Quote 0
                • mlm12
                  mlm12 @mlm12 last edited by

                  Thanks again George. So, I guess "en" or "en-us" is ok.  Most of our customers are in the US by far, but we also have a smaller percent in Australia, Canada and the UK. But they all speak English.

                  That being said, maybe "en" is best?

                  Michelle

                  1 Reply Last reply Reply Quote 0
                  • GeorgeAndrews
                    GeorgeAndrews @mlm12 last edited by

                    Yeah, I don't think you'll go wrong with "en". Glad to help, hope that answers your question 🙂

                    1 Reply Last reply Reply Quote 1
                    • mlm12
                      mlm12 @mlm12 last edited by

                      thank you!

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      • Urgent help needed for site move with major ranking loss
                        0
                        1
                        24

                      • Site moved. Unable to index page : Noindex detected in robots meta tag?!
                        effectdigital
                        effectdigital
                        0
                        4
                        1.7k

                      • Site under attack from Android SEO bots - expert help needed
                        Mobilio
                        Mobilio
                        0
                        7
                        182

                      • Need help understanding "Clone sites"
                        bizzer
                        bizzer
                        0
                        3
                        152

                      • Need help in Title tags
                        MattAntonino
                        MattAntonino
                        0
                        3
                        318

                      • Need help or explanation on my site!
                        Modbargains
                        Modbargains
                        0
                        6
                        474

                      • Could adding canonical tags to large Ecommerce site ever hurt rankings? Temporarily?
                        firstconversion
                        firstconversion
                        0
                        3
                        806

                      • Need help identifying why my content rich site was hurt by the Panda Update.
                        CPU
                        CPU
                        0
                        3
                        1.1k

                      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