<meta> Tags Resources - Web Center

Meta (<meta>) tags provide additional information about a web page. Search engines use some of the <meta> tag information. Other <meta> tags can be used by web servers.

Placement of <meta> tags

<meta> tags should always be placed in the <head> tag, before the <body> tag.

<meta> Description

A "must have" for all web pages. Used by many search engines for indexing. The "description" <meta> tag is also commonly displayed by search engines as the summary of the web page. The "description" should be related to the contents of that particular page, not the entire site. One or two sentences are enough. You should not duplicate the <title> of the page.

<meta name="description" content="Ohlone College's women's basketball schedule for Spring 2011." />

<meta> Keywords

A "must have" for all web pages. Used by many search engines for indexing. The "keywords" should be related to the contents of that particular page, not the entire site. Think about using misspelled words too. Keywords may be separated by a space or a comma or a comma followed by a space.

<meta name="keywords" content="women basketball schedule basket ball girl woman sports" />

<meta> Content-Type

Specifies the character encoding for the page. This tag is required on each XHTML page so it will validate properly.

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

A variety of character encoding values are available. The one shown is common and appropriate for Ohlone College websites. Another commonly used encoding value is:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<meta> Language

Declares to users the natural language of the web page.

Specify "English" language used for content of page:

<meta http-equiv="content-language" content="en" />

Specify "English - United States" language used for content of page:

<meta http-equiv="content-language" content="en-us" />

<meta> Author

<meta name="Author" content="Jimmy James" />

<meta> Copyright

<meta name="copyright" content="&copy; 2000-2003 ABC Co." />

<meta> Refresh

Use <meta> Refresh to automatically change to another web page after a specified number of seconds. In this example, http://www.ohlone.edu/org/athletics/filename.html is the URL the page will display after 4 seconds have passed.

<meta http-equiv="refresh" content="4;URL=http://www.ohlone.edu/org/athletics/filename.html" />

For accessibility reasons, using this tag is not recommended since it can confuse users of assistive technologies.

<meta> Cache-Control

Use the following <meta> tag to prevent the page from caching. Being cached means that the page is stored on the local computer. Some web servers (such as AOL's web servers) cache pages. Caching makes pages display faster for users. It is best to disable cacheing using "no-cache" for pages that are updated frequently.

<meta http-equiv="Cache-Control" content="no-cache" />

<meta> Expires

This page expires on the date given, which means that the browser will use the cached version until the date is reached. Use a date in the past to expire content right away. Dates must be in Greenwich Mean Time (GMT) time, not PST or EST, using the format shown.

<meta http-equiv="Expires" content="Tue, 20 Aug 2014 14:25:27 GMT" />

Use this <meta> tag to expire the page immediately:

<meta http-equiv="Expires" content="0" />

<meta> Pragma

This is another way to control browser caching. To use this tag, the value must be "no-cache". When this is included in a document, it prevents Netscape Navigator from caching a page locally.

<meta http-equiv="Pragma" content="no-cache" />

The <meta> Cache-Control, <meta> Expires and <meta> Pragma tags can be used as together to keep your content current - but beware: There are reports that Internet Explorer refuses the <meta> tag instructions, and caches the files anyway.

<meta> Robots

A robot is a program used by search engines. It will visit a web page, index it, and then visit all the hyperlinks in that page, indexing them all. Search engines often send a robot to your site in order to add your site's pages to the search engine database.

You may not want certain pages on your site to appear in a search engine. These might be pages containing sensitive information, or those which should not be viewed outside of a frameset. You can use the <meta> tag to provide instructions to robots visiting a page: You can tell them not to index the page, or not to follow any of the links on it, or both.

Here are examples of some of the <meta> Robots tags you can use (use only one on a page):

<meta name="robots" content="noindex,nofollow" />
<meta name="robots" content="noindex,follow" />
<meta name="robots" content="index,nofollow" />
<meta name="robots" content="index,follow" />
     <== default

The default action is to index the page and follow all links. It is not necessary to encode that <meta> tag into your pages if that is the action you desire.

<meta> Turn Off Telephone Number Detection

By default, many mobile browsers/applications detect any string formatted like a phone number and make it a link that calls the number. However, this auto telephone number detection can mistakenly create links for strings like "1999-2001". To turn off telephone number detection:

<meta name="format-detection" content="telephone=no" />

Then, if you want to specifically create a link for a telephone number, markup the phone number with an anchor tag like one of these:

<a href="tel:1-800-555-5555">1-800-555-5555</a>
<a href="tel:1-800-555-5555">(800) 555-5555</a>
<a href="tel:1-800-555-5555">Call us toll free!</a>

Source: Apple URL Scheme Reference.

Other telephone number-related protocols include:

  • callto:
    • Example: callto://+18005555555
  • skype:
    • Example: skype:+14035551111?call

<meta> Turn Off Microsoft Smart Tags

<meta name="MSSmartTagsPreventParsing" content="true" />

<link> Designate a Favicon

Using the <link> tag instead of the <meta> tag, designate a Favicon as follows:

<link rel="icon" type="image/x-icon" href="http://www.domain.edu/favicon.ico" />