The best HTML <meta> tag Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Tag definitions and instructions,Tips and Notes,Differences between HTML 4.01 and HTML5,Differences between HTML and XHTML,Examples,Attributes,Event Properties,related articles,
Metadata that describes the HTML document:
All major browsers support the <meta> tag.
Metadata (Metadata) data is information data.
<Meta> tag provides metadata HTML document. Metadata is not displayed in the client, then the browser will be resolved.
Last Review META element often used to describe a given page, keyword, file, authors, and other metadata.
Metadata can be used by browsers (how to display content or reload page), search engines (keywords), or other Web service calls.
Note: <meta> tag is generally placed in the <head> area.
Note: Metadata is usually name / value pairs appear.
NOTE: If no name attribute, then the name / value pairs in the name takes the value http-equiv attribute.
HTML5 does not support the scheme attribute.
In HTML5, there is a new charset attribute, which makes it easier to define the character set:
In HTML <meta> tag has no end tag.
In XHTML <meta> tag must have a closing tag.
Example 1 - Define the document keywords for search engines:
Example 2 - Define web page description:
Example 3 - Define page author:
Examples 4 - refresh the page every 30 seconds:
New: HTML5 new property.
属性 | 值 | 描述 |
---|---|---|
charset New | character_set | 定义文档的字符编码。 |
content | text | 定义与 http-equiv 或 name 属性相关的元信息。 |
http-equiv | content-type default-style refresh |
把 content 属性关联到 HTTP 头部。 |
name | application-name author description generator keywords |
把 content 属性关联到一个名称。 |
scheme | format/URI | HTML5不支持。 定义用于翻译 content 属性值的格式。 |
<p> tag supports all HTML event attributes .
HTML Tutorial: HTML head