What are meta tags used for?

metadata Metadata is information about data.

The <meta> tag provides metadata about the HTML document. 1. How the machine parses; 2. Add the HTTP header content sent by the server to the browser.


content is a required attribute, and http-equiv and name are non-required content:

        When there is an http-equivor nameattribute, there must be a content attribute to describe it. E.g:

1. There are two ways to write about charset. For charset, you must write the first line, otherwise garbled characters may be generated:

<meta charset="UTF-8">
<meta http-equiv="charset" content="UTF-8">

The http-equiv attribute is to add the content of the http header. The value in the content is an interpretation of the charset, which can be understood as the browser's header contains { charset: UTF-8; }

2. About name

<meta name="keywords" content="HTML,ASP,PHP,SQL">

can be understood as {keywords:"HTML,ASP,PHP,SQL"} .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325382924&siteId=291194637