Meta tag details

Source: Internet
Author: User
Meta is an auxiliary tag in the head area of the html language. In almost all webpages, we can see the following html code:

<Head>
<Meta http-equiv = "content-Type" content = "text/html; charset = gb2312">
</Head>

Maybe you think the code is dispensable. In fact, if you can use the meta tag well, it will bring unexpected results, for example, adding keywords will be automatically collected by large search sites; you can set the page format and refresh, etc.


I. Composition of meta tags

Meta tags have two attributes: http-equiv and name. Different attributes have different parameter values, which enable different webpage functions.

     1. name attribute

The name attribute is mainly used to describe the webpage, and the corresponding attribute value is content. The content in the content is mainly used to facilitate search engine robots to find information and classify information.

The syntax format of the name attribute of the meat tag is <meta name = "parameter" content = "specific parameter value">.

The name attribute has the following parameters:

     A. Keywords)

Note: keywords are used to tell the search engine what keywords are on your webpage.

Example: <meta name = "keywords" content = "science, education, culture, politics, ecnomics, relationships, entertaiment, human">

      B. description (website content description)

Description: description is used to tell the search engine the main content of your website.

Example: <meta name = "description" content = "This page is about the meaning of science, education, culture.">

     C. robots (robot Wizard)

Note: robots is used to tell robots which pages need to be indexed and which pages do not need to be indexed.

Content parameters include all, none, index, noindex, follow, and nofollow. The default value is all.

Example: <meta name = "robots" content = "none">

     D. author (author)

Note: The author of the webpage

Example: <meta name = "author"Content = "Lightning, web @">

2. http-equiv attributes

Http-equiv, as its name implies, is equivalent to an http file header. It can return some useful information to the browser to help display the webpage content correctly and accurately. The corresponding attribute value is content, content is actually the variable value of each parameter.

The syntax of the http-equiv attribute of the meat tag is as follows: <meta http-equiv = "parameter" content = "parameter variable value">. The http-equiv attribute mainly includes the following parameters:

     A. Expires (term)

</

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.