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> balise

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-nameDéfinir le nom de l'application Web représentée par la page.
authorDéfinir le nom de l'auteur du document.
Exemple : <meta name="author" content="oldtoolbag.com">
descriptionDéfinir la description de la page. Les moteurs de recherche afficheront cette description dans les résultats de recherche.
Exemple : <meta name="description" content="Free web tutorials">
generatorDéfinir un paquet de logiciels utilisé pour générer le document (non utilisé pour les pages manuscrites).
Exemple : <meta name="generator" content="FrontPage 4.0">
keywordsDéfinir une liste de mots-clés séparés par des virgules - pages associées (informe les moteurs de recherche des sujets auxquels la page est liée).
Astuce :Toujours définir les mots-clés (nécessaire pour la classification des pages par les moteurs de recherche).
Exemple : <meta name="keywords" content="HTML, meta tag, tag reference">
 HTML <meta> balise