Author: Detailed pizi meta tag of [2003-10-7 14:51:21]
Meta is an auxiliary tag in the HTML language HEAD area. Almost all the pages, we can see HTML code similar to this section:
head>Maybe you think that these codes can be available. In fact, if you can use a good Meta tag, you will bring you unexpected effects. For example, join keywords will automatically collected automatically by large search sites; you can set the page format and refresh, etc..
First, the composition of the Meta label
The Meta tag has two properties, which are http-equiv attributes and Name properties, and different attributes have different parameter values, which achieve different web features.
1, Name property
The Name property is primarily used to describe the web page, and the corresponding attribute value is Content, and content in Content is to facilitate search engine robots to find information and classification information.
The Name property syntax format of the MEAT tag is: .
The Name attribute has the following parameters:
A, keywords (keyword)
Description: Keywords is used to tell the search engine for your web page keywords.
Example:
C, Robots (Robot Wizard)
Description: Robots is used to tell the search robot which pages require an index, which pages do not require an index.
Content's parameters include All, None, INDEX, NOINDEX, FOLLOW, NOFOLLOW. The default is all.
Example:
D, Author (author)
Description: Name the author of the web page
Example:
2, HTTP-Equiv property
HTTP-Equivia, equivalent to HTTP's file header, which can pass some useful information to the browser to help correct and accurately display web content, and the corresponding attribute value is content, content in Content is actually Variables of each parameter.
The HTTP-Equiv property syntax format of the MEAT tag is: where the http-equiv property has the following parameters: A, Expires (Limited)
Note: Can be used to set the expiration time of the web page. Once the web page expires, you must re-transfer on the server.
Usage:
Note: The time format of GMT must be used.
B, PRAGMA (Cache mode)
Description: Prohibiting the browser from accessing the page from the cache of the local computer.
Usage:
Note: This is set, and the visitor will not be able to browse it offline.
C, refresh (refresh)
Description: Automatically refresh and point to the new page.
Usage:
Note: 2 refers to the automatic refresh to the URL URL after staying for 2 seconds.
D, set-cookie (cookie setting)
Note: If the web is expired, the cookie of the store will be deleted.
Usage:
Note: The time format of GMT must be used.
E, window-target (setting window setting)
Note: Forced page is displayed in a stand-alone page at the current window.
Usage:
Note: Used to prevent others from calling their own pages in the frame.
F, Content-Type (setting of the character set)
Description: Set the character set used by the page.
Usage:
Second, the function of META label
Above we introduced some basic components of the Meta label, then let's take a look at the common features of the Meta label:
1. Help the homepage to be logged in by major search engines
One important feature of the Meta label is to set the keyword to help your homepage is logged in by major search engines and improve the number of websites. In this feature, the most important thing is to set up keywords and description. Since the search engine works, the search engine first dispatches the robot to automatically retrieve the keywords and Decription in the page, join it to your own database, and then sort the site according to the keyword density. Therefore, we must set keywords to increase the search clicks of the page. Let's take an example for your reference:
2. Define the use of the page
This is the most common feature of the Meta tag. When we make a web page, we will see it under the pure HTML code. Its role is to define your webpage, when the viewer visits your web page, the browser will automatically recognize And set the language in the web page, if your web page is set to the GB code, and the viewer does not install the GB code, and the web page will only present the browser's default language set by the browser. Similarly, if the page is English, then charset = en. Below is a representative example:
This code means setting the language of the web page to national code.
3, automatically refresh and point to new pages
If you want your page to automatically access the specified web page in the specified time in the specified time, you can use the Meta tag's automatic refresh web page. Let's take a look at a code:
This code can automatically go automatically to the http://www.yeah.net page after 2 seconds, this is the Meta's refresh, in Content, 2 represents the time set (in seconds) And the URL is a web address that is automatically connected after the specified time.
4, animation effect when realizing web page conversion
Using the Meta tag, we can also achieve animation effects in an flash of entering the web or leave the web, we can add the following code between the
head> tag in the HTML code of the page:
Once the code is added to a web page, we will see some special effects when we enter and exit the page. This feature is actually like Format / Page Transition in FrontPage2000, but we have to pay attention to the web page cannot be a frame. page;
5, web level evaluation
IE4.0 The above version of the browser prevents some restricted websites, while the browser will automatically identify whether some websites are restricted, because the level of the site is already set in the website Meta tab, and The level of assessment is assessed by the US RSAC, the entertainment committee rating agency, if you need to evaluate your own website, you can connect to the website http://www.rsac.org/, submit the form as required, then RSAC will provide a paragraph Meta code is given to you, you can copy it in your own page. Below is a code: >
6, control page buffer
The Meta tag can set the time of the web page, that is, when you set the page in the Internet Explorer browser, first check the page in the local buffer, then browse a web page, and the local buffer is sometimes, then the browser You will automatically browse the pages in the buffer until the time set in Meta expires, this time, the browser will get a new page. For example, the code below means that the expiration time of the web is 18:18:18:18:18:18.
7, control web display window
We can also use the Meta tab to control the window displayed by the web page. Just add the following code to the web page: