Adding Meta Languange tag to xhtml site - coding help needed
-
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 -
thank you!
-
Yeah, I don't think you'll go wrong with "en". Glad to help, hope that answers your question
-
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
-
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.
-
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.
-
The Bing Webmaster Central article where they discuss how to set the language for your pages is here.
-
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 -
This is likely what you are looking for, but I don't think this is causing you any SEO problems.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Site re-design, full site domain A/B test, will we drop in rankings while leaking traffic
We are re-launching a client site that does very well in Google. The new site is on a www2 domain which we are going to send a controlled amount of traffic to, 10%, 25%, 50%, 75% to 100% over a 5 week period. This will lead to a reduction in traffic to the original domain. As I don't want to launch a competing domain the www2 site will not be indexed until 100% is reached. If Google sees the traffic numbers reducing over this period will we drop? This is the only part I am unsure of as the urls and site structure are the same apart from some new lower level pages which we will introduce in a controlled manner later? Any thoughts or experience of this type of re-launch would be much appreciated. Thanks Pete
Intermediate & Advanced SEO | | leshonk0 -
Moving from a static HTML CSS site with .html files to a Wordpress Site while keeping link structure
Mozzers, Hope this finds you well. I need some advice. We have a site built with a dreamweaver template, and it is lacking in responsiveness, ease of updates, and a lot of the coding is behind traditional web standards (which I know will start to hurt our rank - if not the user experience). For SEO purposes, we would like to move the existing static based site to Wordpress so we can update it easily and keep content fresh. Our current site, thriveboston.com, has a lot of page extensions ending in .html. For the transition, it is extremely important for us to keep the link structure. We rank well in the SERPs for Boston Counseling, etc... I found and tested a plugin (offline) that can add a .html extension to Wordpress pages, which allows us to keep our current structure, but has anyone had any luck with this live? Has anyone had any luck moving from a static site - to a Wordpress site - while keeping the current link structure - without hurting any rank? We hope to move soon because if the site continues to grow, it will become even harder to migrate the site over. Also, does anyone have any hesitations? It this a bad move? Should we just stay on the current DWT template (the HTML and CSS) and not migrate? Any suggestions and advice will be heeded. Thanks Mozzers!
Intermediate & Advanced SEO | | _Thriveworks0 -
Meta Tag Force Page Refresh - Good or Bad?
I had recently come across a meta tag that could cause a auto refresh on a users browser when implemented. I have been using it for a redesign and was curious if there could be any negative effects for using it, here is the code: All input is appreciated. Ciao, Todd Richard
Intermediate & Advanced SEO | | RichFinnSEO0 -
In mobile searches, does Google recognize HTML5 sites as mobile sites?
Does Google recognize HTML5 sites using responsive design as mobile sites? I know that for mobile searches, Google promotes results on mobile sites. I'm trying to determine if my site, created in HTML5 with responsive design falls into that category. Any insights on the topic would be very helpful.
Intermediate & Advanced SEO | | BostonWright0 -
Canonical Tag Uses Source Title and Meta Data?
When optimising a regional same language micro site within a sub folder of a .com it dawned on me that our use of the hreflang and canonical meta elements will render individual elements such as H1 and title obsolete. As a canonical tag takes the canonical source title and meta right? It would still have value in optimising localised headings though? Appreciate any thoughts, suggestions (o:
Intermediate & Advanced SEO | | 3wh0 -
Affiliate Links Added and Site Dropped in only Google
My site was dropshipping a product and we switched to an affiliate offer. We had three 4 links to different affiliate products. Our site dropped the next day. I have been number 1 for 6 months, has a pr 6 and is 2 years old. It has been 2 weeks and the site hasn't jumped back. Any suggestions on how to handle this?
Intermediate & Advanced SEO | | dkash0 -
Google +one button - help needed
I have installed Google plus button on my homepage. My GA report is being displayed like this - 7 total events were recorded Total Events Unique Events 7 2 Event action Total Events on 4 off 3 My questions are - 1 ) Is someone clicking on Google plus button considered an Event ? 2 ) What is meant by 2 Unique Events 3 ) Why does GA report shows on 4 and off 3
Intermediate & Advanced SEO | | seoug_20050 -
How often do you refresh meta descriptions? And does refreshing meta descriptions help in ranking?
1. And does refreshing meta descriptions help in ranking? 2. How often do you refresh meta descriptions? I am not sure whether it's a new feature, but I noticed this little time stamp on one of the search results, it says 1 day ago, and the website ranked quite high. So is there any correlation here? o4JIw.png
Intermediate & Advanced SEO | | robotseo0