Meta Tags detailed introduction

Source: Internet
Author: User
Tags add format define generator header net sort variable
Meta is an auxiliary label for the HTML language Head area. Using meta tags in almost every web page can have unexpected results.

Meta is an auxiliary label for the HTML language Head area. In almost all of the pages, we can see HTML code similar to the following paragraph:



Maybe you think the code is optional. In fact, if you can use a good meta tag, it will bring you unexpected results, such as the keyword will automatically be collected automatically by the large search site, you can set the page format and refresh and so on.
I. Composition of META tags
Meta tags have two properties, they are the Http-equiv property and the Name property, different properties have different parameter values, these different parameter values to achieve different Web page features.
1, Name property
The name attribute is mainly used to describe the Web page, and the corresponding attribute value of Content,content is mainly convenient for search engine robot to find information and classify information.
The name attribute syntax format of the META tag is: The Name property has the following main parameters:
A, Keywords (keywords)
Description: Keywords is used to tell search engines what the keywords are on your page.
Example: B, description (Website content description)
Description: Description used to tell the search engine your site's main content.
For example:
C, Robots (Robot Guide)
Description: Robots are used to tell search bots which pages need to be indexed and which pages do not need to be indexed.
The parameters of the content are all,none,index,noindex,follow,nofollow. The default is all.
Example:
D, author (author)
Description: The author of the callout page
Example: 2, Http-equiv Property
Http-equiv as the name implies, the equivalent of HTTP file header, it can send back some useful information to the browser to help correct and accurate display of Web page content, and the corresponding property value of the content,content is actually the variable value of each parameter.
The HTTP-EQUIV attribute syntax format of the META tag is: A, Expires (term)
Description: Can be used to set the expiration time of a Web page. Once the page expires, it must be retransmitted to the server.
Usage: Note: The time format for GMT must be used.
B, Pragma (cache mode)
Description: Prevents browsers from accessing page content from the local computer's cache.
Usage: Note: This setting makes it impossible for visitors to browse offline.
C, refresh (refreshing)
Description: Automatically refreshes and points to the new page.
Usage: Note: 2 of which is to stop for 2 seconds after the automatic refresh to the URL URLs.
D, Set-cookie (Cookie set)
Note: If the page expires, the saved cookie will be deleted.
Usage:
Note: The time format for GMT must be used.
E, Window-target (display window settings)
Description: Forces the page to appear as a separate page in the current window.
Usage: Note: Used to prevent others from calling their own pages in the frame.

F, Content-type (display set of character set)
Description: Set the character set used by the page.
Usage:
Second, meta tags of the function
We've covered some of the basics of the META tags, and then we'll take a look at the common features of the META Tags:
1, help the homepage by the major search engine login
A very important function of meta tags is to set keywords to help your home page to be logged on by major search engines, and to increase the number of visits to your site. In this function, the most important is the keywords and description settings. Because according to the search engine work principle, the search engine first sends the robot to automatically retrieve the keywords and the decription in the page, and joins it to own database, then then according to the keyword density will sort the website. Therefore, we have to set a good keyword to improve the page search click-through. Let me give you an example for your reference:
After setting these keywords, the search engine will automatically add these keywords to the database and sort them according to the density of the keywords.
2, define the use of the language of the page
This is the most common feature of META tags, and when making a Web page, we see it in pure HTML code, it is to define the language of your Web page, when viewers visit your Web page, the browser will automatically identify and set the language of the page, if you set the page is GB code, and the viewer does not install GB code, The Web page will only render the browser default language set by the viewer. Similarly, if the page is English, then charset=en. The following is a representative example:
The code indicates that the language of the Web page is set to GB code.
3, automatically refresh and point to the new page
If you want to make your Web page in an unattended situation and automatically access the specified Web page within a specified time, you can use the META tags to automatically refresh the page's functionality. Let's look at a piece of code here:
〈meta http-equiv=″refresh″content=″2; url=http://www.root.net″〉
This code can make a current page in 2 seconds automatically to go to the Http://www.root.net page, this is the Meta refresh, in the content, 2 represents the set time (in seconds), and the URL is the specified time after the automatic connection of the Web page address.
4, the implementation of Web page conversion animation effect
Using meta tags, we can also animate the moment we enter the page or leave the page, as long as we add the following code between the tags in the page's HTML code:
Once the above code is added to a Web page, we will see some special effects when entering and leaving the page, this function is in fact the same as the format/page transition in FrontPage2000, but we should note that the added page cannot be a frame page;
5. Web Page Grading Evaluation
IE4.0 the above version of the browser can prevent browsing some restricted sites, the reason the browser will automatically identify certain sites is restricted, because the site is already set up in the META tags of the site, and the level of evaluation by the United States Rsac, that is, the Entertainment Committee rating agencies, If you need to evaluate your own site, you can connect to the site http://www.020webseo.com/, submit the form as required, then RSAC will provide a section of meta code for you to copy to your website. The following is a sample code example:
〈meta Http-equiv=″pics-label″
content=′ (Pics-1.1″http://www.rsac.org/ratingsv01.html″
L Gen True Comment″rsaci North America Server″
For″http://www.rsac.org″
On″2001.08.16t08:15-0500″
R (N 0 s 0 v 0 L 0)) ′〉
6, control the page buffer
Meta tags can set the time when the page expires, that is, when you set up browsing in Internet Explorer browser first look at the page in the local buffer, then when browsing a page, and the local buffer sometimes, then the browser will automatically browse the buffer in the page, The browser will not be able to get a new page until the time set in meta is due. For example, the following code indicates that the Web page expires January 12, 2001 18:18 18 seconds.
〈meta Http-equiv=″expires″content=″friday, 12-jan-2001 18:18:18 gmt″〉
7, control the window displayed by the Web page
We can also use META tags to control the window displayed by the page, just add the following code to the page: This code prevents the Web page from being invoked as a frame by others.
8, refresh (refreshing)
Description: Let the page refresh itself for how long (in seconds), or how long to have the page automatically link to other pages.
Usage:
Note: 5 of which is to stop for 5 seconds after the automatic refresh to the URL URLs.
9. Expires (term)
Description: Specifies the expiration time of the Web page in the cache, and once the page expires, it must be reopened on the server.
Usage:

Note: You must use the time format of GMT, or set directly to 0 (the number indicates how many times after the expiration).
10, Pragma (Cach mode)
Description: Prevents the browser from accessing the contents of the page from the local computer's cache.
Usage:
Note: The Web page does not exist in the cache and the page is refreshed on each visit. This setting will make it impossible for visitors to browse offline.
11, Set-cookie (Cookie set)
Description: When a browser accesses a page, it is cached and can be read from the cache the next time it is accessed to increase speed. When you want your visitors to refresh the icon for your ad every time, or to refresh your counter every time, disable the cache. Usually HTML files do not need to disable caching, for pages such as ASP, you can use disable caching, because every time you see the page is dynamically generated on the server, the cache is meaningless. If the page expires, the saved cookie will be deleted.
Usage: 21-oct-98 16:14:21 GMT; path=/">
Note: The time format for GMT must be used.
12, Window-target (display window settings)
Description: Forces the page to appear as a separate page in the current window.
Usage:
Note: This property is used to prevent others from calling your page in the frame. Content options: _blank, _top, _self, _parent.
Some other uses in the head
1. Scheme (scheme)
Description: Scheme can be used when name is used to specify how the value of content should
be interpreted.
Usage:
Attention:
2, Link (links)
Description: Linking to a file
Usage:
Note: Many Web sites if you save her in your Inbox, you will notice that it has a small icon, and if you click into it again, you will find a small icon in the address bar. Now you can easily implement this feature by adding this phrase to your page header. used to link the current file with other URLs, but there will be no link button, used in the tag, the format is as follows:


3, Base (Basis link)
Description: Insert Web page Base link Properties
Usage:
Note: All the relative paths on your page will be preceded by a "http://www.cn8cn.com/" in the link. where target= "_blank" is a linked file opens in a new window, you can do other settings. Change "_blank" to "_parent" is the link file opens in the parent window of the current window, the _self link file opens in the current window (frame), and the "_top" link file is displayed in full screen.
How to use meta techniques:
Meta tag is a language used to describe the properties of a Web page, the standard meta tags can be easily sorted by search engines to improve the ranking of Search engine Web site weights. If you want to make the site more in line with the search engine standards must understand the META tags, the following from the seoer to talk about the meaning of meta tags and how to use:
1. Meta tag keywords
Written as:
Meat tags Keywords information parameters that represent what the site's keywords are.
2. Meta tag description

Meta tags are description information parameters that represent the main content of the site, and what the profile is.
3, Meta tags of the http-equiv=content-type content= "text/html
Http-equiv=content-type represents the HTTP header protocol, which prompts the browser Web page for information,

Meta tags description information parameters such as GB2312 when the representative describes the site is the use of the code is Simplified Chinese;
Meta tags description information parameters such as BIG5 when the representative describes the site is the use of the code is traditional Chinese;
Meta tags description information parameters such as ISO-2022-JP when the representative describes the site is used in the code is Japanese;
Meta tags description information parameters such as ks_c_5601 when the representative describes the site is the use of the code is Korean;
Meta tags description information parameters such as iso-8859-1 when the representative describes the site is used in the code is English;
Meta tags description information parameters such as UTF-8, representing the world's common language encoding;
4. Meta tag Generator

Meta tag Generator information parameters that represent what software is used to make the site.
5. Meta Tag author

Meta tag's author information parameter that represents the copyright author information for the page.
6, the META tag http-equiv= "Refresh"

The META tag's refresh represents how much time the page automatically refreshes, plus the URL parameter on behalf of how long to automatically link to other URLs.
7, Meta tags http-equiv= "Pragma" content= "No-cache"
prohibits browsers from accessing the contents of the page from the local computer's cache, so set up, visit
The person who asked will not be able to browse offline.
8, the META tag of the copyright

Meta tags The information parameters of the copyright, representing the site copyright information.
9, Meta tags of the http-equiv= "Imagetoolbar"

Specifies whether the Picture toolbar is displayed, and when False is not displayed, the display is represented by true.
10. Meta Tag Content-script-type

The Web page specification that indicates the type of script in the page.
11. Meta Tag Revisit-after

Revisit-after on behalf of the website Revisited, 7 days for 7 day, and so on.
12, meta tags of the robots

Robot representatives tell search engine what pages to crawl
The properties are described below:
The information parameter is all: The file will be retrieved and the link on the page can be queried;
The information parameter is none: The file will not be retrieved and the link on the page cannot be queried;
The information parameter is index: The file will be retrieved;
The information parameter is follow: the link on the page can be queried;
The information parameter is NOINDEX: The file will not be retrieved, but the link on the page can be queried;
The information parameter is nofollow: The file will not be retrieved and the link on the page can be queried.
13, Meta tags
On behalf of the page in the current window with a separate page, you can prevent your own web page by others as a frame page call, settings are: _blank, _top, _self, _parent.
14. Meta Tag Set-cookie

On behalf of cookie settings, if the page expires, save the cookie will be deleted, you need to note that the GMT time format must be used

Related Article

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

Starter Package

SSD Cloud server and data transfer for only $2.50 a month

Get Started >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.