Penn Computing
Computing Menu Computing A-Z
Computing Home Information Systems & Computing Penn

The HTML META Tag

This document provides instructions on how to use the HTML META tag to help search engines better index your Web documents. It also provides specific instructions for using the META tag with the AltaVista Search utility. AltaVista is the search engine used at Penn to manage, search, and retrieve information across its Web servers. Web developers who do not want their documents indexed via the AltaVista Search utility should consult Excluding Directories from AltaVista Search. Presently, AltaVista does not support the META ROBOTS tag.

Note: Web developers should be familiar with the factors that influence how AltaVista ranks documents, and how to create Web documents that take advantage of this feature. See How AltaVista Ranks Search Results for more information.

What Is a META Tag?

The META tag is primarily used to help search engines better index a document by supplying additional information about the document. The types of additional information that META tags can provide include an author's name, a description or short abstract of a document, or a set of keywords for indexing a document. Providing this type of additional information should increase the chance that users will find your documents -- the information they want -- on the Web. In addition to providing indexing information, META tags can also be used to refresh a Web page or to redirect a user from one Web page to another.

Not all search engines use the META tag. For example, AltaVista and InfoSeek use META tags for indexing but Excite does not. Because Penn uses the AltaVista search utility, document developers are encouraged to use META tags to improve the retrieval of their documents by the Penn community.

Formatting the META Tag

The META tag is part of the header information of an HTML document. It has a start tag but does not have a corresponding end tag. The tag is placed after the TITLE end tag; and more than one META tag can be used within a document, depending on the type of information that you want to provide.

Example
The META tag is placed in the header section of the HTML document, after the </TITLE> tag:

<HTML>
<HEAD>
&LT;TITLE&GT;PPP for Windows 95&LT;/TITLE&GT;
&LT;META HTTP-EQUIV="DESCRIPTION" CONTENT="This document describes how to configure Windows 95 for dial-up networking on your personal computer.">
</HEAD>

The META tag is formatted as a name/value pair, where NAME or HTTP-EQUIV identifies the name or property and CONTENT identifies the property value. You can use NAME and HTTP-EQUIV interchangeably. (When using NAME, the interpretation of the attribute is left up to the browser; whereas the HTTP protocol will interpret HTTP-EQUIV attributes.)

Example
You can use the NAME and HTTP-EQUIV attributes interchangeably. The format of the tag is as follows. Note that you must replace the ? with an HTML attribute (e.g., KEYWORDS) and the ?? with a value or text string (e.g., "artificial intelligence,artificial language"). Place both the attribute and its corresponding value in double quotes.

&LT;META NAME="?" CONTENT="??" &GT;
<META NAME="KEYWORDS" CONTENT="ppp,dial-up networking">
or
&LT;META HTTP-EQUIV="?" CONTENT="??"&GT;
<META HTTP-EQUIV="KEYWORDS" CONTENT="ppp,dial-up networking">

META Tag Attributes

Several attributes can be used within the META tag. This document provides examples for the DESCRIPTION and KEYWORDS attributes. For a list of other META tag attributes and how you can use them, see A Dictionary of HTML META Tags.

DESCRIPTION
This attribute controls what text the search engine will display on the "Search Results" page as the result of a search. Because users will read this information and determine whether they want to visit your page, describe the content, subject, or purpose of your document as succinctly as possible.

Note: AltaVista will display up to 1,024 characters for a DESCRIPTION. This number includes the the text between the TITLE start and end tags and the text you've written for the DESCRIPTION attribute.

Example
The code:

&LT;META HTTP-EQUIV="DESCRIPTION" CONTENT="This document describes how to configure Windows 95 for dial-up networking on your personal computer.">

Will display on the Penn Web "Search Results" page as follows. Note that "PPP for Windows 95" before the description would be taken from the TITLE tag:

PPP for Windows 95
This document describes how to configure Windows 95 for dial-up networking on your personal computer. http://www.upenn.edu/computing/help/doc/dialup/win95ppp.html - size 22K - 6 Sep 97

Without the META DESCRIPTION attribute, the search query will display on the "Search Results" page the title of the document (if no title is specified using the TITLE tag, the text "No Title" will display) and the first few text lines of the file. Thus, if the opening paragraph of your document consists of names of committee members, this information would be displayed as the document summary on the "Search Results" page. For example, the actual search query "museum" returns the following results on the Penn Web "Search Results" page:

Example
The following document summary does not have a META DESCRIPTION attribute:

 
 Penn Museum Library - Services for Patrons with
 Disabilities
    Museum Library - Services for Patrons with Disabilities.
    It is the mission of the University of Pennsylvania
    Library to provide equal access to...
    http://www.library.upenn.edu/museum/museum-disabilities.html
    - size 2K - 11 Sep 97

The actual source code for the document is shown below. Note that AltaVista has counted and subsequently shown on the "Search Results" page the "first few lines" of the document which is comprised of the text for the TITLE tag, the text for the H2 tag, and the first line of the paragraph.

Example
Source code of document without the META DESCRIPTION attribute:

<HTML>
<HEAD>
<TITLE>Penn Museum Library - Services for Patrons with Disabilities</TITLE>
<!-- Author: Lisa Horowitz -->
<!-- Last Revision: 11/05/96 -->
</HEAD>
<BODY bgcolor="#ffffff">
<H1><img src="/img/banner.gif" alt="Penn Library"></H1>
<H2><strong>Museum Library - Services for Patrons with Disabilities</strong></h2>
<hr>

It is the mission of the University of Pennsylvania Library to provide
equal access to information for all Penn students, faculty and staff.  The
Library has made provisions to assist patrons with disabilities in
accessing, retrieving and using library materials.
<P>

KEYWORDS
The KEYWORDS attribute provides additional keywords to describe the content or subject of your document. The search engine will use these keywords in addition to the rest of the keywords that it automatically indexes for your document. When formatting this section, put your most important keywords first, use a comma to separate each keyword, and place the list of keywords in double quotes.

Note: AltaVista will allow a maximum of 1,024 characters to be entered as keywords. In selecting keywords, be aware of how AltaVista treats queries entered in uppercase and lowercase letters (see the AltaVista online help) and keep in mind how your users will want to search and retrieve information. See Determining Keywords for Web Documents for more information.

Example
You can define a set of keywords for your document. Users can then use these keywords to improve their chances of finding your documents on the Web.

<META HTTP-EQUIV="KEYWORDS" CONTENT="dial-up networking,ppp windows,windows ppp,windows 95 modems,modem configuration,modem connection,external modem">

top

Information Systems and Computing
University of Pennsylvania
Comments & Questions


University of Pennsylvania Penn Computing University of Pennsylvania Information Systems & Computing (ISC)
Information Systems and Computing, University of Pennsylvania