W3Schools.com

HTML <meta> name Attribute

HTML meta Tag Reference HTML <meta> tag

Example

Use the name attribute to define a description, keywords, and the author of an HTML document:

<head>
<meta name="description" content="Free Web tutorials" />
<meta name="keywords" content="HTML,CSS,XML,JavaScript" />
<meta name="author" content="Hege Refsnes" />
</head>

Try it yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The name attribute is supported in all major browsers.


Definition and Usage

The name attribute provides a name for the information/value of the content attribute.

If the http-equiv attribute is set, the name attribute should not be set.


Syntax

<meta name="value" />

Attribute Values

Value Description
abstract Defines a secondary description
author Defines the author of the document.

Example:
<meta name="author" content="Hege Refsnes" />
classification Classifies the site into the correct category
copyright Defines copyright information of the document.

Example:
<meta name="copyright" content="2011© W3Schools.com" />
description Search engines can pick up this description to show with the results of searches.

Example:
<meta name="description" content="Free web tutorials" />
distribution Declares whether the document is available to the web or on an intranet.
  • web - for the full internet
  • intranet - only for intranet

Example:
<meta name="distribution" content="web" />

doc-class Specifies completion status of the document
doc-rights Specifies copyright status of the document
doc-type Specifies the type of the document
DownloadOptions The associated content property determines what buttons are visible on the File Download dialog box
expires Specifies the date and time when the page expires.

Example:
<meta name="expires" content="Fri, 10 Jun 2011 12:00:00 GMT" />
generator Specifies the name of the program that generated the document
googlebot Informs the Google search engine about indexing, archiving and link-following rules.
  • noarchive - Prevent Google search engine from archiving the page
  • nofollow - The page can be indexed, but links should not be followed
  • noindex - Google robots should follow links, but not index the page
  • nosnippet - Prevent Google search engine from saving snippets and archiving the document

Example:
<meta http-equiv="googlebot" content="noarchive" />

keywords Informs search engines what your site is about.

Tip: Always specify keywords (needed by search engines to catalogize the page).

Example:
<meta http-equiv="keywords" content="HTML, HTML DOM, JavaScript" />
MSSmartTagsPreventParsing Prevents any Microsoft product from automatically generating smart tags
name Specifies the name of the document
owner Defines the owner of the page or site
progid Defines the id of a program used to generate the document
rating Defines webpage rating
refresh The document will display for a specified amount of time before refreshing or switch to a new URL.

Example:
<meta name="refresh" content="10" />
<meta name="refresh" content="10;URL=http://www.w3schools.com" />
reply-to Defines an email address of a contact for the document
resource-type Defines the type of web resource
revisit-after Defines how often search engine spiders should revisit the site
robots Defines page indexing mechanisms for robots, search engine indexing and link-following rules.

The content attribute should contain a comma separated list of the following values:
  • ALL - Robots should follow links, index and archive this page
  • FOLLOW - Search engine robots should follow links from this page
  • INDEX - Robots should include and index this page
  • NOARCHIVE - Prevent search engines from archiving the page
  • NOINDEX - Robots should follow links, but should not index the page
  • NOFOLLOW - The page can be indexed, but links should not be followed
  • NONE - Search engine robots can ignore the page

Example:
<meta name="robots" content="ALL" />
<meta name="robots" content="INDEX,NOFOLLOW" />

Template The content attribute should specify the location of the template used to edit the document
others You can define your own names in a schema


HTML meta Tag Reference HTML <meta> tag
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE