Html meta summary and htmlmeta Summary

Source: Internet
Author: User

Html meta summary and htmlmeta Summary
Introduction

In my previous blog, I had an introduction to meta, such as the http://www.haorooms.com/post/liulanq_think_ie browser security thinking article, which introduced some attributes of IE under meta to implement transition between pages. It has been mentioned in SEO optimization. The following describes the functions and usage of meta.

Preface meta is an auxiliary tag in the head area of the html language. Maybe you think the code is dispensable. In fact, if you can make good use of the meta tag, it will bring you unexpected results. The meta tag has the following functions: Search Engine Optimization (SEO), defining the language of the page, automatically refresh and refer to the new page to achieve the dynamic effect of page conversion, control page buffering, page Rating Evaluation, control page display windows, etc! Meta summary in html

Meta tag composition: meta tags have two attributes: http-equiv and name. different attributes have different parameter values, these different parameter values 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 meta 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 = "meta summary, html meta, meta attributes, meta jump">

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 = "haorooms blog, meta summary in html, meta is an auxiliary tag in the html head area. ">

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">

The specific parameters are as follows:

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 be retrieved, but the link on the page cannot be queried;

D. author (author)

Note: the author of the webpage

Example:

<meta name="author"content="root,root@xxxx.com">

E. generator

<Meta name = "generator" content = "Information Parameters"/>

The information parameter of the generator of the meta tag indicates the software used by the website.

F, COPYRIGHT

<Meta name = "COPYRIGHT" CONTENT = "information parameter">

The COPYRIGHT parameter of the meta tag, indicating the website COPYRIGHT information.

G, revisit-after

<META name="revisit-after"CONTENT="7days">

Revisit-after indicates that the website is revisited, and 7 days indicates 7 days.

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 meta tag is as follows:

<Meta http-equiv = "parameter" content = "parameter variable value">;

The http-equiv attribute has the following parameters:

A. Expires (TERM)

Note: You can set the expiration time of a webpage. Once the webpage expires, it must be re-transmitted to the server.

Usage:

<meta http-equiv="expires"content="Fri,12Jan200118:18:18GMT">

Note: The GMT time format must be used.

B. Pragma (cache Mode)

Note: The browser is prohibited from accessing the page content from the cache of the local computer.

Usage:

<meta http-equiv="Pragma"content="no-cache">

Note: in this way, visitors will not be able to browse offline.

C. Refresh (Refresh)

Note: automatically refresh and point to the new page.

Usage:

<Meta http-equiv = "Refresh" content = "2; URL = http://www.haorooms.com"> // (note the quotation marks, before the second and after the URL, respectively)

Note: 2 means that the URL is automatically refreshed after 2 seconds.

D. Set-Cookie (cookie setting)

Note: If the webpage expires, the cookie on the disk will be deleted.

Usage:

<meta http-equiv="Set-Cookie"content="cookie value=xxx;expires=Friday,12-Jan-200118:18:18GMT;path=/">

Note: The GMT time format must be used.

E. Window-target (display Window settings)

Note: The Force page is displayed on an independent page in the current window.

Usage:

<meta http-equiv="Window-target"content="_top">

Note: It is used to prevent others from calling their own pages in the framework.

F. content-Type (display character set setting)

Description: sets the character set used on the page.

Usage:

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

The details are as follows:

If the charset Information Parameter of the meta tag is GB2312, it indicates that the website uses simplified Chinese characters;

When the charset Information Parameter of the meta tag is BIG5, it indicates that the website is encoded in Traditional Chinese;

Meta tag charset information parameters such as iso-2022-jp, indicating that the website is encoded in Japanese;

If the charset Information Parameter of the meta tag is ks_c_5601, it indicates that the website is encoded in Korean;

Meta tag charset information parameters such as ISO-8859-1, indicating that the website is encoded in English;

Meta tag charset information parameters such as UTF-8, representing the world's common language encoding;

G. content-Language (set the Display Language)

Usage:

<meta http-equiv="Content-Language"content="zh-cn"/>

H. Cache-Control specifies the Cache mechanism for requests and responses.

Cache-Control specifies the Cache mechanism that requests and responses follow. Setting Cache-Control in a request message or response message does not modify the Cache processing process of another message. Request cache Commands include no-cache, no-store, max-age, max-stale, min-fresh, on

Ly-if-cached: commands in the Response Message include public, private, no-cache, no-store, no-transform, must-revalidate, proxy-revalidate, and max-age. The instructions in each message are as follows:

Public indicates that the response can be cached in any cache area.

Private indicates that the whole or part of the response message of a single user cannot be processed by the shared cache. This allows the server to describe only part of the user's response message, which is invalid for requests of other users.

No-cache indicates that the request or response message cannot be cached.

No-store is used to prevent the unintentional release of important information. Sending a request message does not cache the request and response messages.

Max-age indicates that the client can receive responses with a lifetime not greater than the specified time (in seconds ).

Min-fresh indicates that the client can receive a response whose response time is earlier than the current time plus the specified time

Max-stale indicates that the client can receive response messages beyond the timeout period. If the value of the max-stale message is specified, the client can receive response messages that exceed the timeout period.

J. http-equiv = "imagetoolbar"

<meta http-equiv="imagetoolbar"content="false"/>

Specifies whether to display the image toolbar. If it is set to false, the image is not displayed. If it is set to true, the image is displayed.

K. Content-Script-Type

<Meta http-equiv="Content-Script-Type"Content="text/javascript">

W3C Web page specification, indicating the script type on the page.

L page Jump, used only for IE

See http://www.haorooms.com/post/liulanq_think_ie for details

HTML <base> tag

Specify the default open mode for all links on the page:

For example:

<base target="_self">

All tags on the specified page are displayed on this page!

PS: original

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.