标签:
CSS:Cascading Style Sheets(层叠样式表)
有三种方式可以在XHTML页面中嵌入CSS.参见CSS教程.
<head><linkrel="stylesheet"type="text/css"href="style.css"/></head>
此例使用了link标签.
abbr{font-size:12px;}.text10pxwhite{font-size:10px;color:#FFFFFF;}
style.css的内容
<head><styletype="text/css">abbr{font-size: 12px;}.text10pxwhite{font-size: 10px;color: #FFFFFF;}</style></head>
此例使用了style标签.
两种方法是殊途同归的(但是推荐使用第一种方法,在CSS教程中我将告诉你为什么).
<pstyle="font-size: 12px;color: #000;">使用css</p>
HTML style 标签
<style>开始,以</style>结束media -- 媒体类型,参见CSS高级教程type -- 包含内容的类型,一般使用type="text/css"<head><styletype="text/css">abbr{font-size: 12px;}.text10pxwhite{font-size: 10px;color: #FFFFFF;}</style></head>
HTML link 标签
<head><linkrel="stylesheet"type="text/css"href="style.css"/></head>
HTML rel rev属性
appendix -- 定义文档的附加信息bookmark -- 书签chapter -- 当前文档的章节contentscopyright -- 当前文档的版权glossary -- 词汇help -- 链接帮助信息index -- 当前文档的索引nofollow -- 不被用于计算PageRanksection -- 作为文档的一部分subsection -- 作为文档的一小部分rel与rev属性相同,它们都是属于LinkTypes属性.
<linkrel="stylesheet"href="http://www.dreamdu.com/style.css"type="text/css">
rel与rev具有互补的作用,rel指定了向前链接的关系,rev指定了反向链接的关系.
HTML alternate 属性值
定义两种不同的样式,用户可以通过浏览器选择样式(ie不支持此属性)
<linkrel="stylesheet"type="text/css"title="blue"href="dreamdublue.css"/><linkrel="alternate stylesheet"type="text/css"title="red"href="dreamdured.css"/>
可以通过http://www.dreamdu.com/feed/读取http://www.dreamdu.com/的内容
<linkrel="alternate"type="application/rss+xml"href="http://www.dreamdu.com/feed/"/>
HTML start next prev 属性值
<linkrel="start"type="text/html"href="http://www.dreamdu.com/xhtml/"/><linkrel="prev"type="text/html"href="http://www.dreamdu.com/xhtml/alternate/"/><linkrel="next"type="text/html"href="http://www.dreamdu.com/xhtml/attribute_rel/"/>
HTML rel canonical 属性值
<linkrel="canonical"href="http://dreamdu.com/"/>
指定网页http://www.dreamdu.com/为搜索引擎应收录的链接(规范链接)。可以将上述代码复制到所有非规范网址的head部分,例如网址www.dreamdu.com、www.dreamdu.com/default.html、www.dreamdu.com/index.html等
标签:
原文地址:http://www.cnblogs.com/JSWBK/p/5601093.html