Home > Article > Web Front-end > How to use html meta tag
The role of meta tag.
metadata Chinese name is metadata, which is data used to describe data. It will not be displayed on the page, but can be recognized by the machine. It is often used to define the description, keywords, and last modification date of the page. , and other information stored by the browser on how to layout or reload the page. Search engines and other services.
Two attributes http-equiv attribute and name attribute
The name attribute is mainly used to describe web pages, such as keywords, narratives, etc. . The attribute value is content
.
A. keywords(keywords)
Description: Used to tell search engines the keywords of your web page. Example:
B. description (description of website content )
Description: Used to tell search engines the main content of your website. Example:
The more important thing is the viewport attribute. Commonly used in mobile design.
http-equiv attribute is equivalent to http file header attributes.
content-type is used to set the web page character set type for convenience Browser renders
//Old HTML, not recommended
C. cache-control (specify the caching mechanism followed by requests and responses)
The above is the detailed content of How to use html meta tag. For more information, please follow other related articles on the PHP Chinese website!