HTML DOM Meta name Property

## JavaScript Reference

Overview

## JavaScript Objects

JS Array JS Boolean JS Date JS Math JS Number JS String JS RegExp JS Global

## Browser Objects

Window Navigator Screen History Location

## HTML DOM Objects

DOM Document DOM Elements DOM Attributes DOM Events

## HTML Objects

DOM Anchor DOM Area DOM Base DOM Body DOM Button DOM Form DOM Frame/IFrame DOM Frameset DOM Image DOM Input Button DOM Input Checkbox DOM Input File DOM Input Hidden DOM Input Password DOM Input Radio DOM Input Reset DOM Input Submit DOM Input Text DOM Link DOM Meta DOM Object DOM Option DOM Select DOM Style DOM Table DOM td / th DOM tr DOM Textarea

# Meta name Property

Meta Object

## Definition and Usage

The name property sets or returns a name for the information in the content attribute.

The value of the name attribute depends on the value of the content attribute.

The name property can hold a predefined value, or a user-defined value.

## Syntax

Set the name property:

linkObject.name="name"

Return the name property:

linkObject.name

The predefined name values are:

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

## Browser Support

The name property is supported in all major browsers.

## Example

Display the value of the name attribute of the <meta> tag:

<html>
<head>
<meta name="keywords" content="HTML,HTML DOM,JavaScript">
<script>
function displayResult()
{
var x=document.getElementsByTagName("meta")[0].name;
alert(x);
}
</script>
</head>
<body>
<button type="button" onclick="displayResult()">Display meta name</button>
</body>
</html>
Try it yourself »

Meta Object

## Your suggestion:

Your E-mail (optional):

Page address:

Description:

Close [X]

## Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

## WEB HOSTING

Best Web Hosting UK Reseller Hosting Wow! $5 SSD Hosting

## WEB BUILDING

Download XML Editor
FREE Website BUILDER FREE Website Creator

## WEB RESOURCES

Web Statistics Web Validation

## SHARE THIS PAGE