Detailed description of the role of meta tags in html

Source: Internet
Author: User

Meta Tags are embedded and embedded tags in html code. meta tags have many functions, but many webmasters who are new to html code are the easiest to ignore, meta tag attributes include name and http-eauiv.
Meta Tags are in the The name tag is mainly used to describe a webpage and provide search engines with information about relevant documents, such as keyword and description;
Common name attributes include the following:
Name attribute:
1. <meta name = "keywords" contect = "">
Here, contect = "" is filled with the main Keywords of this document in quotation marks. For example, if the keyword of this webpage is meta, write contect = "meta ". Although the research in the SEO field is that this label does not play a very important role, it is still necessary for new users to learn how to build websites.
2. <meta name = "description" contect = ""> tell the search engine the main content of your site;
Description is a Web Page Content Overview for search engines. Generally, it is best to control 70 Chinese characters, that is, less than 140 characters. The content in description is not directly displayed on the page, it is mainly like the information provided by the search engine to determine the page content. For example, the main content of our page is about "The Role of meta tags in html, then you can write a summary of the core content of your article, that is, the content of the article.
3. <meta name = "author" contect = "">
The author attribute tells the name of the creator of the web page of the search engine. Currently, there is no discussion about the importance of this tag.
4. <meta name = "Robots" contect = "">
The content here must be filled with specific parameters. The following describes all parameters in detail.
All: files will be retrieved, and links on the page can be queried;
None: the file will not be retrieved, and the link on the page cannot be queried;
Follow: links on the page can be queried;
Noindex: the file will not be retrieved, but the link on the page can be queried;
Nofollow: files will not be retrieved, and links on the page can be queried.
Index: the file will be retrieved;
You can enter specific parameters in the content according to your own situation. If your webpage only writes some personal content, you do not want the search engine to retrieve your webpage, then you can use contect = "none"
Netease: <meta name = "robots" content = "index, follow"/>
This tag is not available for other portals.
Http-equiv attributes
1. <meta http-equiv = "Content-Type" contect = "text/html "; charset = gb_2312-80 "> and <meta http-equiv =" Content-Language "contect =" zh-CN ">
This sentence is used to specify the encoding used by your web page. There are two kinds of UTF-8 and GBK commonly used;
2. <meta http-equiv = "Refresh" contect = "30; url = http://www.cssking.net">
This is a code that regularly redirects pages. You can customize the page Jump time in seconds. For example, we set 30 seconds here, this line of code is mainly used in some areas of user interaction, such as user registration of web pages, jump to a page within a limited period of time after the user submits a form, this method is generally not recommended for normal pages, because many people have used this method to cheat SEO, to some extent, SEO will also regard webpages with jumps as black hat SEO.
3. <meta http-equiv = "Expires" contect = "Mon, 12 May 2001 00:20:00 GMT">
This line of code is used to set the expiration time of the Web page. Once it expires, it must be re-called on the server. Note that the GMT time format must be used;
4. <meta http-equiv = "Pragma" contect = "no-cache">
It is used to disable the browser from accessing the page content from the Cache of the Local Machine. Once the page is set, it cannot be called out from the Cache;
5. <meta http-equiv = "set-cookie" contect = "Mon, 12 May 2001 00:20:00 GMT"> cookie setting: If the webpage expires, the cookie on the disk will be deleted. Note that the GMT time format must be used;
6. <meta http-equiv = "Pics-label" contect = ""> webpage rating: There is a content setting in internet Options of IE, it can prevent browsing of some restricted websites, and the website's restricted level is set through the meta attribute;
7. <meta http-equiv = "windows-Target" contect = "_ top"> force the page to be displayed on an independent page in the current window, it can prevent your webpage from being called as a frame page by others;
8. <meta http-equiv = "Page-Enter" contect = "revealTrans (duration = 10, transtion = 50) "> and <meta http-equiv =" Page-Exit "contect =" revealTrans (duration = 20, transtion = 6) "> set the special effect when you enter and Exit the Page, this function is called "format/Webpage transition" in FrontPage, but the page to be added cannot be a frame page.
The above is my personal summary of the role of meta tags in html. For Beginners, the html packages can be used for a test.
==== A few supplements ====
Token restrictions, but this method does not work. You still need to use meta for implementation. Specifically, add the following to the 404 page:
<Meta name = "robots" content = "noindex">
Such a piece of code is OK. The goal of adding these things is not to tell everyone how to do it, but to say that meta is useful in practical applications, although it is not often used.

Related Article

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.