head区是指首页HTML代码的<head>和</head>之间的内容。
必须加入的标签
1.公司版权注释
<!---ThesiteisdesignedbyMaketown,Inc06/2000--->
2.网页显示字符集
简体中文:<METAHTTP-EQUIV="Content-Type"CONTENT="text/html;charset=gb2312">
繁体中文:<METAHTTP-EQUIV="Content-Type"CONTENT="text/html;charset=BIG5">
英语:<METAHTTP-EQUIV="Content-Type"CONTENT="text/html;charset=iso-8859-1">
3.网页制作者信息
<METAname="author"content="136z.com">
4.网站简介
<METANAME="DESCRIPTION"CONTENT="xxxxxxxxxxxxxxxxxxxxxxxxxx">
5.搜索关键字
<METANAME="keywords"CONTENT="xxxx,xxxx,xxx,xxxxx,xxxx,">
6.网页的css规范
<LINKhref="style/style.css"rel="stylesheet"type="text/css">
(参见目录及命名规范)
7.网页标题
<title>xxxxxxxxxxxxxxxxxx</title>
可以选择加入的标签
1.设定网页的到期时间。一旦网页过期,必须到服务器上重新调阅。
<METAHTTP-EQUIV="expires"CONTENT="Wed,26Feb199708:21:57GMT">
2.禁止浏览器从本地机的缓存中调阅页面内容。
<METAHTTP-EQUIV="Pragma"CONTENT="no-cache">
3.用来防止别人在框架里调用你的页面。
<METAHTTP-EQUIV="Window-target"CONTENT="_top">
4.自动跳转。
<METAHTTP-EQUIV="Refresh"CONTENT="5;URL=
http://www.hhlong.com">
5指时间停留5秒。
5.网页搜索机器人向导.用来告诉搜索机器人哪些页面需要索引,哪些页面不需要索引。
<METANAME="robots"CONTENT="none">
CONTENT的参数有all,none,index,noindex,follow,nofollow。默认是all。
6.收藏夹图标
<linkrel="ShortcutIcon"href="favicon.ico">
所有的javascript的调用尽量采取外部调用.
<SCRIPTLANGUAGE="javascript"SRC="script/xxxxx.js"></SCRIPT>
附<body>标签:
<body>标签不属于head区,这里强调一下,为了保证浏览器的兼容性,必须设置页面背景<bodybgcolor="#FFFFFF">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
是超链接的属性,表示无下划线
① a:link:未访问链接
② a:visited:已访问链接
③ a:active:激活时(链接获得焦点时)链接的颜色
④ a:hover:鼠标移到链接上时