一个标准的网页首先head区是需要比较规范的!
head区是指首页html代码的<head>和</head>之间的内容。
必须加入的标签
1.公司版权注释
<!--- the site is designed by maketown,inc 06/2000 --->
2.网页显示字符集
简体中文:<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">
3.网页制作者信息
<meta name="author" content="[email]webmaster@xxxxx.com[/email]">
4.网站简介
<meta name="description" content="网站简介">
5.搜索关键字
<meta name="keywords" content="关键字,关键字,关键字,关键字,关键字,">
6.网页的css规范
<link href="style/style.css" rel="stylesheet" type="text/css">
(参见目录及命名规范)
7.网页标题
<title>xxxxxxxxxxxxxxxxxx</title>
.可以选择加入的标签
1).设定网页的到期时间。一旦网页过期,必须到服务器上重新调阅。
<meta http-equiv="expires" content="wed, 26 feb 1997 08:21:57 gmt">
2).禁止浏览器从本地机的缓存中调阅页面内容。
<meta http-equiv="pragma" content="no-cache">
3).用来防止别人在框架里调用你的页面。
<meta http-equiv="window-target" content="_top">
4).自动跳转。
<meta http-equiv="refresh" content="5;url=http://www.yahoo.com">
5指时间停留5秒。
5.网页搜索机器人向导.用来告诉搜索机器人哪些页面需要索引,哪些页面不需要索引。
<meta name="robots" content="none">
content的参数有all,none,index,noindex,follow,nofollow。默认是all。
6.收藏夹图标
<link rel = "shortcut icon" href="favicon.ico">
所有的javascript的调用尽量采取外部调用.
<script language="javascript" src="script/xxxxx.js"></script>
附<body>标签:
<body>标签不属于head区,这里强调一下,为了保证浏览器的兼容性,必须设置页面背景<body bgcolor="#ffffff">[/html]
新标准
<!--无为搜索 -->
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "
http://www.w3.org/tr/2000/rec-xhtml1-20000126/dtd/xhtml1-transitional.dtd";>
<html xmlns="
http://www.w3.org/1999/xhtml"; lang="gb2312">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta http-equiv="content-language" content="gb2312" />
<meta content="all" name="robots" />
<meta name="description"
content="iwbuy.com是一个搜索的网站,主要搜索音乐,flash,seo,列车航班等等!
" />
<meta name="keywords" content="seo,flash,音乐,mtv,列车,航班" />
<meta name="author" content=fkasp@iwbuy.com,无为搜索 />
<meta name="copyright" content="无为搜索" />
<title>无为搜索-音乐搜索-无为</title>
<!-- 调用样式表 -->
<link rel="stylesheet" href="images/style.css" type="text/css" media="all" />
</head>