homepage Welcome to WebmasterWorld Guest from 54.237.54.83
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
doctype question for xhtml
mihomes




msg:4369010
 3:51 am on Sep 30, 2011 (gmt 0)

I have always used the following as mytemplate per say :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>title</title>
<meta name="keywords" content="keys" />
<meta name="description" content="desc" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
</head>

----

Is it necessary or recommended to change to <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">?

The pages are all in english language and I do not want to limit it... in other words I would like the entire world to be able to view the pages.

Second question related to this is one .co.uk site I have which is also written in english of course, but I would like to limit it to the UK only... it seems that eventhough it is a .co.uk it does not appear to show in uk engines.

 

tedster




msg:4369023
 4:55 am on Sep 30, 2011 (gmt 0)

1. The lang attribute does not limit country, it only describes the language of the content.

2. There's nothing you can do in HTML about the second issue. Search engines today assume that a ccTLD (country-code Top Level Domain) like .co.uk is a UK targeted website. Even in Google Webmaster Tools, there will be no option to choose a different geographic target.

mihomes




msg:4369024
 5:06 am on Sep 30, 2011 (gmt 0)

Gotcha... so is it 'bad' that I have :

<html xmlns="http://www.w3.org/1999/xhtml">

and not specifying the language there?

tedster




msg:4369029
 6:00 am on Sep 30, 2011 (gmt 0)

Not really "bad" - search engines can recognize the language of the document without seeing the declaration.

g1smd




msg:4369039
 6:44 am on Sep 30, 2011 (gmt 0)

I've always declared content type and content language before the title and meta description elements. I've not use the meta keywords element for a nearly a decade now.

Do you really need XHTML? I have always used HTML 4.01. You should be looking at HTML 5 right about now.

mihomes




msg:4369072
 8:40 am on Sep 30, 2011 (gmt 0)

Well I find that I can do everything I need in XHTML strict without the hassles of worrying about it showing correctly in this browser or that browser for the most part (css, etc aside) so that is what I have been and plan to stick to.

penders




msg:4369527
 2:29 pm on Oct 1, 2011 (gmt 0)

tedster: 2. There's nothing you can do in HTML about the second issue. Search engines today assume that a ccTLD (country-code Top Level Domain) like .co.uk is a UK targeted website. Even in Google Webmaster Tools, there will be no option to choose a different geographic target.


Are you saying that users from outside the UK are less likely to find a co.uk site via the search engines purely because of the TLD? Assuming the site content is completely universal and not country specific in any way (apart from being language specific).

tedster




msg:4369562
 4:54 pm on Oct 1, 2011 (gmt 0)

If you have a .co.uk site it will automatically be targeted to the UK. And yes - users outside the UK will definitely have less exposure to a .co.uk domain via search. There can be some if the site grows into a real popular place internationally through some mechanism or other, but it's almost always a slow go.

The question was "I would like to limit it to the UK only", which is sort of the reverse. I don't know of any way to limit it either, at least not through the HTML or through search engine input.

The fact that this site "it does not appear to show in uk engines" could point to many things - technical problems with the code, the server, lack of backlinks, DNS issues, malware... who knows what else.

But that's almost never an HTML issue unless the source code is just plain impenetrable. That said, do make sure you haven't accidentally block crawling via robots.txt. robots meta tags or incorrect canonical link tags. And some hackers have been known to intentionally create these kind of obstacles on a site, cloaking their dirty work so that only the search engine sees it.

To check for this kind of hacking, set up Google WebmasterTools and use their "Fetch as googlebot" tool for a sampling of your pages.

penders




msg:4370029
 10:06 am on Oct 3, 2011 (gmt 0)

It would seem that if you search via google.com (as opposed to google.co.uk or some other country specific google search) then you are not subject to the same country restriction during search.

It has been suggested that, "the effect [of geotargeting] is relatively small versus other, more basic factors like the actual content of your pages." (Reference [webmasters.stackexchange.com])

If you have a generic TLD (.com, .org, ...) then in Google Webmaster Tools you can choose to target a specific country if you wish. But as tedster states, a ccTLD will automatically be targeted to that country and this cannot be changed.

More information in Google Webmaster Tools - Geotargeting
https://www.google.com/support/webmasters/bin/answer.py?answer=62399&hl=en

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved