Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <meta> name Attribute

The name attribute on a <meta> tag assigns a name to the content in that meta element.

Each meta tag has a unique name.

Example

#

Four <meta> tags, each with a different name value.
The name identifies the content of each meta element.

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="HTML Tutorial for front-end designers and developers. ">
<meta name="keywords" content="HTML, CSS, Bootstrap">
<meta name="author" content="DoFactory">
meta = metadata

Using name

The name attribute assigns a name to the content of the meta element.

The name values are predefined values, listed below

If the http-equiv attribute has a value, then the name attribute should not be used.


Syntax

<meta name="value">

Values

#

Value Description
viewport Sets the viewport, i.e. visible area, of the web page.
keywords Specifies a comma-separated list of keywords that apply to the page.
description Specifies the page description.
This is used by search engines to display as a page summary.
author Specifies the page's author name. Either a company or a person.
application-name Specifies the application name.
generator Specifies a third-party software package used to generate the page.

More Examples

Metadata that sets the page keywords.

<meta name="keywords" content="HTML, CSS, JavaScript, Tutorials">

Metadata that sets the page description.

<meta name="description" content="HTML, CSS, JavaScript Tutorials for Web Developers.">

Metadata that sets the page author.

<meta name="author" content="Alex Anderson">

Metadata that sets the page viewport, i.e. visible area.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Browser support

Here is when name support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <meta>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides