<!-- 下载hello.txt --> <a href="test.txt" download="hello">点击下载</a>
说明:hello为浏览器下载后文件的名字,浏览器会自动检测文件的扩展名html
<a href="https://github.com/wmui">GitHub</a>
说明:href值能够是相对地址,绝对地址,锚点(#top)git
<a href="https://github.com/wmui" media="print and (resolution:300dpi)">GitHub</a>
and
运算符(至关于&&), not
运算, ,
运算符(至关于||)github
all是默认值,表示适合全部设备。aural表示语音合成器。braille表示盲文反馈装置。handheld表示手持设备。projection表示投影机。print打印预览模式或页面。screen计算机屏幕。tty电传打字机以及使用更宽字符网格的相似媒介。tv电视类型设备。chrome
width: 目标显示区域的宽度(可以使用min-, max-前缀),例如:media = "screen and (min-width: 300px)
浏览器
height: 目标显示区域的高度(可以使用min-, max-前缀),例如:media = "screen and (min-height: 300px)"
app
device-width: 目标显示器的宽度(可以使用min-, max-前缀),例如:media = "screen and (device-width: 300px)"
框架
device-height: 目标显示器高度 (可以使用min-, max-前缀),例如:media = "screen and (device-height: 300px)"
ide
orientation: 目标显示器取向(可能值:portrait, landspace,例如:media = "all and (orientation: landspace)"
oop
aspect-ratio: 目标显示区域的宽高比(可以使用min-, max-前缀),例如:media = "screen and (aspect-ratio: 16 / 9)"
ui
device-aspect-ratio: 目标显示器的宽高比(可以使用min-, max-前缀),例如:media = "screen and (device-aspect-ratio: 16 / 9)"
color: 规定目标显示器的bits per color(可以使用min-, max-前缀),例如:media = "screen and (color: 3)"
color-index: 规定目标显示器可以处理的目标显示数(可以使用min-, max-前缀),例如:media = "screen and (min-color-index: 256)"
monochrome: 规定在单色帧缓冲中的每像素比特(可以使用min-,max前缀),例如: media = "screen and (monochrome: 2)"
resolution: 规定目标显示器的像素密度(dpi 或 dpcm,可以使用min-, max-前缀),例如:media = "print and (resolution: 300dpi)"
scan: 规定tv显示器的扫描方法,可能值progressive和interlace,例如:media = "tv and (scan: interlace)
grid: 规定输出设备是网格仍是位图,可能的值:1表明网格,0表明其让。例如:media = "handheld and (grid: 1)"
<a rel="friend" href="https://github.com/wmui>wmui</a>
说明:rel属性表示了当前文档与目标文档的关系,属性值是以空格分割的关系列表,搜索引擎能够利用该属性得到更多相关信息,也能够根据w3c官方标准自定义一些值。
alternate: 文档的可选版本。
stylesheet: 文档的外部样式表。
start: 第一个文档。
next: 下一个文档。
prev: 上一个文档。
contents: 文档目录。
index文档索引。
glossary: 文档中所用字词的术语或解释。
copyright: 包含版权信息的文档。
chapter: 文档的章。
section: 文档的节。
subsection: 文档的子段。
appendix: 文档附录。
help: 帮助文档。
bookmark: 相关文档。
nofollow: 搜索引擎不要跟踪连接。
另外还用licence,tag,frined。
扩展:以上的属性值亦能够用在<link>
标签的rel属性里
_blank在新窗口中打开文档
_self 默认值,在当前窗口或框架中打开文档
_parent 在父框架集中打开文档
_top 在整个当前窗口中打开文档
framename 在指定框架中打开文档
说明:_parent和_top用于在框架中内嵌的连接
<a href="https://github.com/wmui" type="text/html">wmui</a>
说明:只能在href属性存在时使用,用于规定type属性的MIME类型
The <abbr title="People's Republic of China">PRC</abbr> was founded in 1949.
The PRC was founded in 1949.
说明:abbr用于表示简写或者缩写
<footer> <address> 电话:1234567<br> 邮箱:22337383@qq.com </address> </footer>
说明:用于定义做者/拥有者的联系信息,不该该用于描述通信地址,除非他是联系信息的一部分,该元素一般连同其余信息被包含在footer标签中。当位于body
标签内是表示文档的联系信息,位于article
标签内时表示文章的联系信息。