Home > Article > Web Front-end > html usage_html/css_WEB-ITnose
meta tag provides metadata about the HTML document. The metadata is not displayed on the page, but is machine-readable. It can be used by browsers (how content is displayed or pages are reloaded), search engines (keywords), or other web services. The
element can provide meta-information about the relevant page, such as description and keywords for search engines and update frequency. The tag is located at the head of the document and contains no content. A tag's properties define the name/value pairs associated with the document.
<meta name=”某个设置值” content=”对该设置值进行具体补充说明的信息”><meta http-equiv=”某个设置值” content=”对该设置值进行具体补充说明的信息”>
1. Setting of the name attribute:
1).keywords: Tell the search engine to add the content filled in the content attribute to the search engine as the keywords of the web page. In the content attribute Multiple keywords can be separated by commas, for example:
<meta name=”keywords” content=”软件开发,java”>
2), Description: The search engine uses the setting information in the content attribute without describing the website
3), Robots: Tell The robot or spider released by the search engine decides what action to take based on the settings in the content attribute.
The value of Content can be:
Index can retrieve and include this page, this is the default value.
Noindex does not allow robot/spider to retrieve and include this page.
Follow allows robots and spiders to follow the hyperlinks on this page.
Nofollow prevents robots and spiders from following the hyperlinks on this page.
All tells the robot that the spider can retrieve and include this page, and can follow the hyperlinks on this page to search further.
None means that this page is not allowed to be retrieved and included, nor is it allowed for robots and spiders to search along this page
4), author: used to describe the author of the web page, fill in the author of the web page in content .
5)copyright: used for copyright statement, fill in your copyright statement in the content.
6)generator: Used to describe the name of the tool used to edit this page, and the content is filled in the editing software of the webpage
2. Settings of the http-equiv attribute:
1), content-type is used Describes the MIME type of web content and the character set encoding used for text content.
<meta http-equiv=”content-type” content=”text/html;charset=gb2312”>
2) Refresh is used to tell the browser to automatically refresh the page after a specified period of time.
<meta http-equiv=”Refresh” content=”1”> 时间单位是; 秒 //也可以让浏览器在一定时间后跳到其他网页,时间值与URL之间用分号(;)分隔 <meta http-equiv=”Refresh” content=”1;url=http://www.163.com”>
3): Expires is used to set the arrival time of the web page. After the expiration date specified in the content attribute, the browser must re-download the web page from the server. Note that the setting value in the content attribute must use the GMT time format
<meta http-equiv=”Expires” content=”Mon,12 May 2001 00:02:00 GMT”> CONTENT设置为0,可以禁止浏览器使用缓存页面
4): Windows-Target forces the page to be displayed in a certain window. To prevent your own webpage from being called as a frame page by others, you can use
<meta http-equiv=”Windows-Target” content=”_top”>
5); Pragma is used to set the browser to prevent the browser from caching the page on the local computer, and the content attribute is set to no- cache
<meta http-equiv=”Cache-Control” content=”no-cache”>
6)Page-Enter: Set the special display effect of the browser
<meta http-equiv=”Page-Enter” content=”revealTrans(Transition=23,Duration=1.000)”> Duration表示滤镜特效的持续时间(单位:秒)Transition滤镜类型。表示使用哪种特效,取值为0-23:0 矩形缩小1 矩形扩大2 圆形缩小3 圆形扩大4 下到上刷新5 上到下刷新6 左到右刷新7 右到左刷新8 竖百叶窗9 横百叶窗10 错位横百叶窗11 错位竖百叶窗12 点扩散13 左右到中间刷新14 中间到左右刷新15 中间到上下16 上下到中间17 右下到左上18 右上到左下19 左上到右下20 左下到右上21 横条22 竖条23 以上22种随机选择一种
7):Page-Exit Set the action taken when the browser leaves a web page Special display effects
Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.