您的位置:首页 > Web前端 > HTML

html head 里面的标签

2013-02-28 17:59 399 查看
第一类:

<meta name="?" content="?" />

1.name="keywords" 关键字时 ---》告诉搜索引擎这个网页的主题是什么?

eg:<meta name="Keywords" lang="EN" content="java,c,c++....."/>

2.name="description" 关键字时 ----》告诉搜索引擎这个网页的大致内容

eg:<meta name="description" content="这个网站的大致内容为。。。。"/>

3.name="robots" 这是给搜索引擎看的

当name为Robots时,Content可选参数有

index:当前页面可以被抓取

follow:被当前页面内所链接的页面可以抓取

noindex:当前页面不可以被抓取

nofollow:被当前页面内所链接的页面不可以抓取

Content的内容可以是双选的,例如CONTENT="INDEX,FOLLOW",所以上述这四个参数,共可以组成4种不同的双选结果。

其中

<META NAME="Robots" CONTENT="index,follow" />可以写成<META NAME="Robots" CONTENT="all" />

<META NAME="Robots" CONTENT="noindex,nofollow" />可以写成<META NAME="Robots" CONTENT="none" />

4.name="Author" 告诉搜索引擎,这个页面的作者是谁(一般文章性网站引用较多)

eg:<meta name="Author" Content="xuxiaolin,www.xuxiaolin.cn"/>

5、name="Copyright" 版权,告诉搜索引擎,这个页面的版权是属于谁的。

eg:<meta name="Copyright" Content="版权信息"/>

6、name="Copyright" 各种编辑器做的页面,网站抓取的方式

eg:<meta name="Generator" Content="PCDATA|FrontPage|">

7、name="revisit-after" 更新时间,即告诉搜索引擎这个页面的多久更新

eg:<meta name="revisit-after" content="2 days">

第二类:

常用的HTTP-EQUIV取值有如下11种:

1、Content-Type:声明页面所适用的的字符集,以及页面文档属性。示例:

<meta http-equiv="Content-Type" Content="text/html; Charset=gb2312">

告诉浏览器,该页面为HTML类文档,并且,适用gb2312(中文)作为默认字符。

2、Refresh:设置页面刷新或自动跳转的时间

eg:<meta http-equiv="Refresh" Content="60">

Content="60"的意思是说,60秒后,页面刷新

<meta http-equiv="Refresh" Content="10; Url=http://www.isinwin.cn">

Content="10 的意思是说,10秒后,网页将自动跳转。

3、Expires:设定网页的过期时间,当网页过期后,必须重新读取页面信息。

eg:

<meta http-equiv="Expires" Content="Fri, 15 Jun 2007 01:13:13 GMT">

<meta http-equiv="Expires" Content="0">

时间格式必须为GMT标准时间,Content设置为0则代表该网页永不过期。

4、Pragma:禁止浏览器缓存网页。

eg:<meta http-equiv="Pragma" Content="No-cach">

禁止浏览器缓存页面(但是浏览者同样可以保存页面)

5、Set-Cookie :设定cookie的过期时间。

eg:<meta http-equiv="Set-Cookie" Content="cookievalue=xxx; expires=Wednesday, 21-Oct-98 16:14:21 GMT; path=/">

6、Window-target:强制页面在当前窗口以独立页面显示。

eg:<meta http-equiv="Widow-target" Content="_top">

用来防止别人在框架里调用你的页面。Content选项:_blank、_top、_self、_parent。

第三类:

title/link等标签,后续更新

第四类:

平日里比较常用的块级标签元素有:

<caption>、<dl>、<dt>、<dd>、<form>、<fieldset>、<h1>~<h6>、<hr>、<ul> 、<ol>、<li>、<p>、<table>、<tbody>、<tfoot>、<th>、

<tr>、<td>。

平日里比较常用的行内标签元素有:

<a>、<br>、<img>、<em>、<small>、<label>、<i>、<q>、</p>、<span>、<strong>、<sub>、<sup>。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: