本文所分享的知识点是【Link 标签 rel=Stylesheet的实际作用】,欢迎您喜欢我爱IT技术网所分享的教程、知识、经验或攻略,下面是详细的讲解。
Link 标签 rel=Stylesheet的实际作用
关于Link标签,相信接触的人都知道相关用法,但是我经常忘记rel的实际作用,这次专门查找了下,记录,以作备用。
Link标签有两个作用:1. 定义文档与外部资源的关系;2. 是链接样式表。
下面是链接外部样式表
href 为 URL地址;
type为链接文件的格式;
rel 该属性规定当前文档与被链接文档之间的关系。但是,只有 rel 属性的 "stylesheet" 值得到了所有浏览器的支持。其他值只得到了部分地支持。
| 值 | 描述 |
|---|---|
| alternate | 文档的替代版本(比如打印页、翻译或镜像)。 |
| stylesheet | 文档的外部样式表。 |
| start | 集合中的第一个文档。 |
| next | 集合中的下一个文档。 |
| prev | 集合中的上一个文档。 |
| contents | 文档的目录。 |
| index | 文档的索引。 |
| glossary | 在文档中使用的词汇的术语表(解释)。 |
| copyright | 包含版权信息的文档。 |
| chapter | 文档的章。 |
| section | 文档的节。 |
| subsection | 文档的小节。 |
| appendix | 文档的附录。 |
| help | 帮助文档。 |
| bookmark | 相关文档。 |
link标签是用于当前文档引用外部文档的,其次,这个标签的rel属性用于设置对象和链接目的间的关系,说白了就是指明你链进来的对象是个什么东西的,具体的值及其所表示的关系如下:
Alternate:Substitute version of the file that contains the link.
Appendix:Page that is an appendix for the set of pages.
Bookmark:Bookmark.
Chapter:Page that is a chapter for a set of pages.
Contents:Table of contents document.
Copyright:Copyright notice for the current page.
Glossary:Glossary for the current page.
Help:Help document.
Index:Index document for the current page.
Next:Next document in a sequence.
Offline:href that contains a path to the CDF file to be used for an offline favorite.
Prev:Previous document in a sequence.
Section:Page that is a section for a set of pages.
Shortcut:Icon href that contains a path to an icon file to be used for the favorite or link.
Start:First document of a set.
Stylesheet:Style sheet.
Subsection:Page that is a subsection for a set of pages.
关于Link 标签 rel=Stylesheet的实际作用的相关讨论如下:
相关问题:HTML里img的标签中rel属性是干什么的,有什么用处呢?
答:img很少有人用rel属性的,一般在两种情况下看到 最常见的: 如楼上说的,rel 属性规定当前文档与被链接文档之间的关系。 rel是关联的意思,stylesheet是样式表的意思;它表示这个link在文档初始化时将被使用,渲染页面 另外一个是用作SEO: 百度... >>详细
相关问题:html link元素用于什么? rel="stylesheet"的属性...
答:html的link标签是用于当前文档引用外部文档用的,rel属性用于设置对象和链接目的间的关系。rel是relationship的英文缩写;stylesheet中style是样式的意思,sheet是表格之意,总起来是样式表的意思。rel="stylesheet" 描述了当前页面与href所指定文... >>详细
相关问题:帮忙解释下HTML文档里link标签中rel="stylesheet"
答:这是w3c的标准 REL属性用于定义连接的文件和HTML文档之间的关系 type是说明外链文档的的类型 >>详细
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
