网页Head 区常用代码

之前我也有个“META标签的用途、功能和属性”比较全的说明。本来想精减一下,列出比较常用的head meta代码,正好看到52CSS上有类似文章,转来笔记留存。

我们这里所说的head区域,是指页面html代码的<head>和</head>之间的内容。

一、head区一般必须加入的标识有:

公司版权注释
<!--- the site is designed by Birder 03/2001 --->  

网页显示字符集
简体中文:
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
繁体中文:
<meta http-equiv="content-type" content="text/html; charset=big5" />
英 语:
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
或者:
<meta http-equiv="content-type" content="text/html; charset=utf-8" />

原始制作者信息
<meta name="author" content="zfnn.com" /> 

网站简介,亦可用CMS标签动态描述
<meta name="description" content="这里填您网站的简介" /> 

搜索关键字
<meta name="keywords" content="关键字1,关键字2,关键字3,..." />  

网页的css规范
<link href="style/style.css" rel="stylesheet" type="text/css" /> 

网页标题
<title>荆棘鸟's Blog</title> 

二、head区可选加入的标识有: 

设定网页的到期时间。一旦网页过期,必须到服务器上重新调阅。
<meta http-equiv="expires" content="wed, 26 feb 1997 08:21:57 gmt" /> 

禁止浏览器从本地机的缓存中调阅页面内容
<meta http-equiv="pragma" content="no-cache" />  

用来防止别人在框架里调用你的页面
<meta http-equiv="window-target" content="_top" /> 

自动跳转(5指时间停留5秒)
<meta http-equiv="refresh" content="5;url=www.zfnn.com" />

网页搜索机器人向导.用来告诉搜索机器人哪些页面需要索引,哪些页面不需要索引
<meta name="robots" content="none" />
content的参数有all,none,index,noindex,follow,nofollow。默认是all。 

收藏夹图标
<link rel = "shortcut icon" href="favicon.ico" /> 

  • quote 3. 山寨货网
  • http://www.shanzhaihuo.cn
  • 事实上,<meta name="keywords" content="关键字1,关键字2,关键字3,...">

    网页的css规范
    <link href="style/style.css" rel="stylesheet" type="text/css">
    这些都是不规范的。具体可以参考一下我的网站代码 呵呵 很小的细节。
    http://www.shanzhaihuo.cn
    birder 于 2008-8-25 8:23:18 回复
    看到了,少了标签闭合,多谢。
  • 2008-8-24 13:13:52 回复该留言

评论恒久远,一贴永流传

提交

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

帮助他人 - 快乐自己

最近发表

Search

热门文章

随机推荐

卓越新书

Top

Powered By Z-Blog 1.8 Walle Build 100427

© 2007-2011 zfnn.com. 皖ICP备07503469号