第157页 Creating Hyperlinks
宝元 (克己)
- 章节名:Creating Hyperlinks
- 页码:第157页
文本元件 你应该只用元件语义对应的用法,好在以前的使用方式基本被包含在当下的语义里面了 建议,首先如果有刚好符合人物要求的元件,那就用,第二,在可以避免使用那些以前只表示展现方式的元件,比如 b 元件,最后,不管你怎么用,最好保持你的用法一致 元件 a,要是包含一个 phrasing 元件,那么就认为它是 phrasing 元件,要是包含一个 flow 元件,那么就认为它是 flow 元件,任何可以包含 phrasing 元件的元件都可以包含它,私有属性有 href,hreflang,media,rel,target,type,内容可以使 phrasing content 和 flow 元件,惯例样式
a:link, a:visited { color: blue; text-decoration: underline; cursor: auto; } a:link:active, a:visited:active { color: blue; }用法如下 外部链接,不一定非得是一个网页,也可以是别的协议 https,ftp,mailto 等等
<a href="http://en.wikipedia.org/wiki/Apples">apples</a>相对地址
<a href="fruitlist.html">here</a>文件内超链接
<a href="#fruits"> <p id="fruits">I also like bananas, mangoes, cherries, apricots, plums, peaches and grapes.</p>要是没有 id 附合要求的元件,浏览器会再搜搜 name 是要求的字符串的元件 属性 target 告诉浏览器怎么展示被链接的资源,有以下这些值可供选择 _blank 打开一个新的窗口或标签页 _parent 在父 frameset 里打开 _self 在当前窗口打开,默认项 _top open the document in the full body of the window <frame> 在某个 frame 中打开
宝元对本书的所有笔记 · · · · · ·
-
第135页 Describing Documents with the Metadata Elements 1
title 元件 metadata,只能用在 head 元件内,惯例样式 title {display: none;} ------------...
-
第150页 Denoting External Resources
外置资源用 link 元件,属于 Metadata 类型,可以用在 head 和 noscript 元件中 私有属性有 6...
-
第157页 Creating Hyperlinks
-
第178页 Annotating Content with the Basic Text Elements
b 元件,用于 offset a span,但没有特别的意义,是 phrasing 元件,内容是 phrasing content...
说明 · · · · · ·
表示其中内容是对原文的摘抄