The role of HTML <meta> tags

Source: Internet
Author: User

The <meta> tag contains contextual information about the page document.

The main contained context information:

1. Configure the server to respond to the browser, the HTTP protocol head information, the browser according to the head to do the corresponding action.

2. The description information of the page, convenient search engine classification to find.

The,<meta> tag does not have an end tag in HTML.
In XHTML, the,<meta> tag must be properly closed.

The attribute required for a label is content.

The optional attribute of the label is NAME,HTTP-EQUIV.

1.http Response Head

The applicable http-equiv and content properties are described.

For example:

<http-equiv= "Content-type"  Content= "text/html; charset=gb2312"  /><http-equiv= "Refresh"  content= "5; url=http://www.xxxxx.com "/>

Content described with HTTP-EQUIV is placed in the head of the server's response to the browser.

The browser then performs specific actions on the document according to the content in the response head.

After the two HTTP-EQUIV settings listed above, the following is included in the response head.

Content-type:text/htmlcharset:gb2312refresh:5;url=http://www.xxxxx.com

The meaning is that the document is an HTML page, the coded character set uses gb2312 browser to decode the display page with this character set, 5 seconds after the jump to another URL page.

There are many settings for HTTP-EQUIV, specifically referring to the HTTP protocol or searching with a search engine.

2. Description information of the page

Basically, the search engine will look at the META tag to sort the pages.

The name and content properties are used for the description.

Gca

<!--used to describe the build tool -<Metaname= "Generator"content= "Cnblogs"><!--Web page keywords for search -<Metaname= "keywords"content= "Html,meta"><!--tell the Search engine page The main content description -<Metaname= "description"content= "The role of meta tags for html"><!--tell the author about the search engine page -<Metaname= "Author"content= "White Sea">

The most important of these is keywords and description.

There is also the ability to set Revised,robots (Tell search bots, page retrieval behavior), others entries.

The role of HTML <meta> tags

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.