English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML reference manual

HTML tag大全

HTML meta name attribute

the name attribute specifies the name of the metadata, the name attribute specifies the information of the content attribute/the name of the value, if http-equiv attribute should not set the name attribute.

 HTML <meta> tag

Online Example

Use the name attribute to define the description, keywords, and author of the HTML document. Also define the viewport to control the page size and scaling ratio to adapt to different devices:

<!DOCTYPE html>
<html>
<head>
<title>HTML:<meta> name attribute - Basic Tutorial Network(oldtoolbag.com)</title>
  <meta name="description" content="Free Web tutorials">
  <meta name="keywords" content="HTML5,CSS3,JQUERY">
  <meta name="author" content="oldtoolbag.com">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body
<h1>My Website</h1>
<p>Some text.../p>
</body>
</html>
test to see ‹/›

browser compatibility

IEFirefoxOperaChromeSafari

all mainstream browsers support the name attribute.

usage and definition

the name attribute specifies the name of the metadata.

the name attribute specifies content information about the attribute/the name of the value.

Note:if http-equiv attribute should not set the name attribute.

HTML5introduced a method that allows web designers to control the viewport (the visible area of the user on the web page) through the <meta> tag

HTML 4.01 with HTML5differences

none.

syntax

<meta name="value">

attribute value

valuedescription
application-nameSpecify the name of the Web application represented by the page.
authorSpecify the name of the author of the document.
Example: <meta name="author" content="oldtoolbag.com">
descriptionSpecify the description of the page. Search engines will display this description in search results.
Example: <meta name="description" content="Free web tutorials">
generatorSpecify a software package used to generate the document (not for hand-written pages).
Example: <meta name="generator" content="FrontPage 4.0">
keywordsSpecify a comma-separated list of keywords - related web pages (tells search engines what the page is related to).
Tip:Always specify keywords (necessary for search engines to classify web pages).
Example: <meta name="keywords" content="HTML, meta tag, tag reference">
 HTML <meta> tag