| rel 属性 link标签中的rel属性,定义了文档与链接的关系 |
|
来源:互联网 |
时间:2007-07-06 |
浏览:
相关评论 |
报告错误 |
发布文章
|
【字号:大 | 中 | 小】
【背景色
】
|
|
- 此属性通常出现在a,link标签中
- 属性值
Alternate -- 定义交替出现的链接
Alternate 属性值 -- alternate是LinkTypes的一个值,网页设计者可以通过此值,设计交替出现的链接
示例
定义两种不同的样式,用户可以通过浏览器选择样式(ie不支持此属性) <link rel="stylesheet" type="text/css" title="blue" href="dreamdublue.css" />
<link rel="alternate stylesheet" type="text/css" title="red" href="dreamdured.css" />
可以通过http://www.dreamdu.com/feed/读取http://www.dreamdu.com/的内容 <link rel="alternate" type="application/rss+xml" href="http://www.dreamdu.com/feed/" />
Stylesheet -- 定义一个外部加载的样式表
link 标签 -- 当在文档中声明使用外接资源(比如CSS)时使用此标签
- link标签是单独出现的
- 属性
href -- 指定需要加载的资源(CSS文件)的地址URI
media -- 媒体类型,参见CSS教程
rel -- 指定链接类型
rev -- 指定链接类型
type -- 包含内容的类型,一般使用type="text/css"
示例 <head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
Start -- 通知搜索引擎,文档的开始
start next prev 属性值 -- start next prev,全部属于LinkTypes,此值通常可以提示浏览器文章的开始,下一篇,上一篇的url
示例 <link rel="start" type="text/html" href="http://www.dreamdu.com/xhtml/" />
<link rel="prev" type="text/html" href="http://www.dreamdu.com/xhtml/alternate/" />
<link rel="next" type="text/html" href="http://www.dreamdu.com/xhtml/attribute_rel/" />
next -- 记录文档的下一页.(浏览器可以提前加载此页)
start next prev 属性值 -- start next prev,全部属于LinkTypes,此值通常可以提示浏览器文章的开始,下一篇,上一篇的url
示例 <link rel="start" type="text/html" href="http://www.dreamdu.com/xhtml/" />
<link rel="prev" type="text/html" href="http://www.dreamdu.com/xhtml/alternate/" />
<link rel="next" type="text/html" href="http://www.dreamdu.com/xhtml/attribute_rel/" />
Prev -- 记录文档的上一页.(定义浏览器的后退键)
start next prev 属性值 -- start next prev,全部属于LinkTypes,此值通常可以提示浏览器文章的开始,下一篇,上一篇的url
示例 <link rel="start" type="text/html" href="http://www.dreamdu.com/xhtml/" />
<link rel="prev" type="text/html" href="http://www.dreamdu.com/xhtml/alternate/" />
<link rel="next" type="text/html" href="http://www.dreamdu.com/xhtml/attribute_rel/" />
Contents
Index -- 当前文档的索引
Glossary -- 词汇
Copyright -- 当前文档的版权
Chapter -- 当前文档的章节
Section -- 作为文档的一部分
Subsection -- 作为文档的一小部分
Appendix -- 定义文档的附加信息
Help -- 链接帮助信息
Bookmark -- 书签
rel与rev属性相同,它们都是属于LinkTypes属性.
注意:ie浏览器对此类型的支持非常不好,推荐使用Firefox
|
|
 |
| |
|
|
|
|