|
meta标签放在每个网页的<head>...</head>中,我们大家比较熟悉的如: <meta name="generator" content="microsoft frontpage 3.0">说明编辑工具; <meta name="keywords" content="...">说明关键词; <meta name="description" content="...">说明主页描述;
<meta http-equiv="content-type" content="text/html; charset=gb_2312-80">和 <meta http-equiv="content-language" content="zh-cn">说明所用语言及文字... 可见meta有两种,name和http-equiv。 name主要用于描述网页, 对应于content, 以便于搜索引擎 查找、分类(目前几乎所有的搜索引擎都使用网上机器人自动查找meta值来给你的网页分类)。这其中最重要的是description(你的站点在引擎上的描述)和 keywords(搜索引擎籍以分类的关键词),应该给你的 “每一页” 都插入这两个meta值。当然你也可以不要搜索引擎检索,可用: <meta name="robots" content="all | none | index | noindex | follow | nofollow">来确定:? 设定为"all"时文件将被检索,且页上链接可被查询; 设定为"none"则表示文件不被检索,而且不查询页上的链接; 设定为"index"时文件将被检索; 设定为"follow"则可查询页上的链接; 设定为"noindex"时文件不检索,但可被查询链接; 设定为"nofollow"则表示文件不被检索,但可查询页上的链接. http-equiv 顾名思义相当于http文件头的作用,可以直接影响网页的传输。比较直接的例子如: 1、自动刷新,并指向新网页 <meta http-equiv="refresh" content="10; url=http://yourlink">10秒后刷新http://yourlink; 2、网页间转换时加入效果 <meta http-equiv="page-enter" content="revealtrans(duration=10, transition=50)"> <meta http-equiv="page-exit" content="revealtrans(duration=20, transition=6)"> 加在一个网页中,进出时有一些特殊效果,这个功能即frontpage 98的format/page transition.不过注意所加网页不能是一个frame页; 3、强制网页不被存入cache中 <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="expires" content="wed, 26 feb 1997 08:21:57 gmt"> 大家可以http://www.internet.com/上看看,它的首页当你断线后,就无法在cache中再调出。(本身是关于建站很棒的站点) 4、定义指向窗口 <meta http-equiv="window-target" content="_top"> 可以防止网页被别人作为一个frame调用.(不过,我试了一下,似乎不灵) meta还有很多功能, 如大家关心的"怎样在搜索引擎中,被放在搜索结果前面的位置"http://vancouver-webpages.com/vwbot/mk-metas.html). 你可以在以下站点进一步查询: http://webdeveloper.com/categories/html/html_metatag_res.html; http://vancouver-webpages.com/meta/; http://www.nlc-bnc.ca/ifla/ii/metadata.htm;
|