一、<head></head>篇
:用于指定有关这个文档的相关信息。
http-equiv属性
规则:<meta http-equiv="" content="">
用法1:<meta http-equiv="Content-Type" content="text/html; charset=GB18030">
or<meta http-equiv="Content-Language" content="">
作用1:设定页面所使用的字符集。
用法2:<meta http-equiv="Pragma" content="no-cache">
作用2:设定禁止浏览器从本地机的缓存中调阅页面内容,即无法实现脱机
用法3<meta http-equiv="Refresh" content="8; url=">
作用3:让当前网页在指定时间内调转到指定的网页,时间单位(秒)
用法4:<meta http-equiv="Expires" content="Wed, 12 May 2008 12:00:00 GMT">
作用4:用于指定网页的到期时间,一旦到期就要重新到服务器上调阅,时间格式必须是以GMT格式设定
用法5:<meta http-equiv="Set-Cookie" content="Wed, 12 May 2008 12:00:00 GMT">
作用5:如果网页过期,则删除cookie中保存的网页信息,时间必须是GMT
用法6:<meta http-equiv="Window-target" content="_blank">
作用6:设置网页在窗口中独立显示,为防止他人在frame页面中条用。content属性包括_top, _blank, _self, _parent
规则:<meta name="" content="">
用法1:<meta name="keywords" content="today, green, school">
作用1:搜索引擎能搜索到该网页的关键字,即将该网页的关键字通知给搜索引擎
用法2:<meta name="Author" content="罗强, 839183621@">
作用2:搜索引擎搜索到该网页的作者或E-mail
用法3:<meta name="Description" content="站点内容">
作用3:搜索引擎搜索到网站的主要内容
用法4:<meta name="Robots" content="all|none|index|noindex|follow|nofollow">
作用4:用来通知搜索引擎哪个页面需要索引,哪个页面不需要索引
参数解释:
content设定为all:文件被检索,而且页面上的链接能被查询
content设定为none:文件不能被检索,而且页面上的链接也不能被查询
content设定为index:文件被检索
content设定为noindex:文件不被检索,但页面上的链接能被查询
content设定为follow:页面的链接能被查询
content设定为nofollow:文件不被检索,但页面上的链接能被查询
用法5:<meta name="Copyright" content="Al
HTML总结 来自淘豆网m.daumloan.com转载请标明出处.