Working With Meta Tags in HTML Documents - (Part 2)

By: Daniel Imbellino
Updated: Feb 28, 2013

Meta Robots Property:
You use Meta robots to tell search whether or not to index your content or follow the links from it. Keep in mind, if search engines don't index your content, then no one can find it on the internet! Some pages you may not want to be indexed, such as a contact form page, where you don't want spammers getting a hold of your email information, etc.

To instruct search engines to index and follow your content use this code:
<meta name="robots" content="index,follow" />

Here we've instructed the search engines to index our page as well as follow the links from it, inturn effectively indexing the other pages that the links follow.

Likewise, if we didn't want our page to be index or the content to be followed, we could use this code:
<meta name="robots" content="noindex,nofollow" />

More Meta Name Properties:

You can use the Meta Name Property to define a number of different attributes for your webpages as shown here:
<meta name="abstract" content="Used for a secondary description of your page or content" />

<meta name="author" content="name of author that created the content" />

<meta name="copyright" content="your copyright notice regarding your pages content" />

<meta name="refresh" content="45" /> This instructs the browser to refresh the page once every 45 seconds. This is useful for web pages that have time critical applications running within them.

<meta name="revisit-after" content="15 days" /> Tells search engine spiders how often to revisit your page for re-indexing of updated content is there is any.

<meta name="distribution" content="global" /> The Meta distribution property tells web search engines what audience your page is intended for. There are 3 values you can with the distribution property, they are, global, local, and IU (internal use). The global value indicates that your website is intended for a public audience, local indicates your page is intended for a local intranet (internal network only), and UI (internal use) is intended for personal or local use. There's really no reason to use this tag unless you are building web pages to be used by staff within an internal network, otherwise, search engines will automatically assume your page is intended for global (public) use.

<meta name="language" content="en" /> Used to specify a targeted language for your website using a language prefix as shown, we used "en" for english here, french would be "fr", etc.

Meta http-equiv:
The Meta "http-equiv" is used to provide an http header for the value of the "content" attribute, such as when setting a "Content-Type" like this:
<meta http-equiv="Content-Type" content="application/html+xml; charset=UTF-8" />

<meta http-equiv="cache-control" content="public" /> The "cache-control" property tells search engines and web browsers such as Internet Explorer or Firefox, whether or not to cache the data contained within a given web page. There are four general values that can be used with this property:
Public: Page data may be cached in a public shared cache (such as a search engine like Google for faster page access). Private: Page data may only be cached locally (such as with a web browser. Browsers typically cache data automatically unless you instruct them not to do so, they do this to load pages faster). no-cache: no data can be cached. no-store: data may be cached but not archived.

<meta http-equiv="date" content="Thurs, 10 Sep 2012 20:44:13 GMT" /> Specifies a time and date that the web page was created.

<meta http-equiv="content-language" content="en-US" /> Specifies a particular language and geographic location of that specified language.

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> Used to specify the type of content included in your document and the type of character encoding scheme used for your content.

You can also specify a language in your HTML like this:
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> (if using XHTML)
OR
<html lang="en-US"> (if using HTML 4.01)