Spatial Meta Tags

If you’re not a web geek, you might want to skip this one. I’m going to delve into some meta tags for a moment, and the audience interested in that sort of thing is probably very, very tiny.

There are a ton of HTML meta tags. I mean a ton. Some are useful. Most you can neither use nor know about and live a perfectly happy life.

One tag you may not have known about is the geo tag. As in geo.position, geo.placename, and geo.region.

The geo tags are designed to let browsers (and search bots) know a location to associate with the web page. Note I said associate with, not necessarily where the page is coming from, which can be derived by other means. If your page is hosted in Sweeden and it’s all about Las Vegas, you probably want to point your geo tags at Las Vegas.

Here’s what the geo tags look like.

<META NAME="geo.placename" CONTENT="Place Name" /> <META NAME="geo.region" CONTENT="Country Subdivision Code" /> <META NAME="geo.position" CONTENT="latitude; longitude" />
If I were to want to geo tag my page as Charlotte, NC, it would look like this:
<META NAME="geo.placename" CONTENT="Tobin's Office, Charlotte NC" /> <META NAME="geo.region" CONTENT="US-NC" /> <META NAME="geo.position" CONTENT="35.227; -80.849" />
Just put that in the document HEAD and your web page will be "on the map". Note that you are describing a point, not a region. Even if you want to associate with North America, you'll still use a point.

Why would you want to include the geo tags in your web page? Well, a lot of it is future capabilities. It tells search bots where your page is, and it’s no accident all of the search companies have mapping pieces now. It will also be useful down the road, as phones with GPS become the browser of choice, showing the subject of a web site on a map along with the user’s current position.

You can view some of this ability now with the Geo extension for Firefox. It presents an icon if geo tags are detected and links the location to a number of sites, like Google Maps, Yahoo! Maps, Microsoft Live Local, Multimap, Flickr, Wikimapia, OpenStreetMap, and GeoURL

There are other ways to georeference your page or elements in your page. For example, here’s how you can georeference an element within the HTML body:

<span style=”display:none” xmlns:geo=”http://www.w3.org/2003/01/geo/wgs84_pos#">
<geo:lat>35.227</geo:lat><geo:long>-80.849</geo:long>
</span>

There’s a whole lot of ways to georeference content within HTML, and in some ways it’s an evolving standard. It’s one of those things that will become a more common feature over time as the spatial element of information continues to become more ubiquitous.

For other ways to georeference HTML content check out this great post from PhotoRSS.