May 03, 2021 HTML5
2. Label definition and instructions for use
4. The difference between HTML 4.01 and HTML5
Metadata that describes html documents:
<head>
<meta name="description" content="免费在线教程">
<meta name="keywords" content="HTML,CSS,XML,JavaScript">
<meta name="author" content="w3cschool">
<meta charset="UTF-8">
</head>
All major browsers support the hashtag.
Metadata is the data information for the data.
The label provides metadata for the HTML document. Metadata is not displayed on the client and is then parsed by the browser.
META elements are typically used to specify the description of the page, keywords, the last modification of the file, the author, and other metadata.
Metadata can be called using a browser (how to display content or reload pages), search engines (keywords), or other Web services.
Note: The label is usually located in the area of the slt;head.
Note: Metadata usually appears as a name/value pair.
Note: If the name property is not provided, the name in the name/value pair takes the value of the http-equiv property.
HTML5 does not support the scheme property.
In HTML5, there is a new charset property that makes the definition of character sets easier:
In HTML, the label does not end the label.
In XHTML, the label must contain an end label.
Example 1 - Define document keywords for search engines:
Instance 2 - Define the description of the web page:
Instance 3 - Define page author:
Instance 4 - Refresh the page every 30 seconds:
New: HTML5 new property.
Property | Value | Describe |
---|---|---|
charset New | character_set | Define the character encoding of the document. |
content | text | Define meta-information related to the http-equiv or name properties. |
http-equiv |
content-type
default-style refresh |
Associate the content property to the HTTP header. |
name |
application-name
author description generator keywords |
Associate the content property to a name. |
scheme | format/URI | HTML5 is not supported. Define the format used to translate the content property value. |
The label supports all HTML event properties.
HTML tutorial: HTML header