首页>>网络营销>>网络策划必读
     
网页中meta标签的使用
 
作者:引用  来源:先锋在线

    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"> 
  当你断线后,就无法在cache中再调出。

         
作者:引用  来源:先锋在线
     

Vanguard On-line 先锋在线商务频道
2000-2008 © 沈阳先锋计算机网络技术服务中心 版权所有
 电话:024-23971553  传真:024-23971642  QQ:63688266 22521201