文本:地址、定义、双向文本和编辑
好的,我们现在应该都知道有很多用于文本的标签。我们已经学了 段落,我们学了 标题,我们甚至还学了 缩写、引用和代码。还有一些更晦涩的标签可以使用。晦涩不是因为它们没用,而是因为它们不会在网上随处可见。如果你发现你的文本符合这些元素的描述,使用它们会让你的 HTML 页面更美观、更丰富、更有意义。
地址
address 标签应该专门用于表示与整个网页(因此只能使用一次)或与 article 元素(参见 Sectioning)相关的**联系方式**。它并不是,如初看可能的那样,用于随意标记任何地址。
<h3>Author contact details</h3>
<address>
<ul>
<li>0123-456-7890</li>
<li>author_dude@noplaceinteresting.com</li>
<li>http://www.noplaceinteresting.com/contactme/</li>
</ul>
</address>
定义术语
dfn 是一个**定义**术语,用于突出一个术语的首次使用。与 abbr 类似,可以使用 title 属性来描述该术语。
<p>Bob's <dfn title="Dog">canine</dfn> mother and <dfn title="Horse">equine</dfn> father sat him down and carefully explained that he was an <dfn title="A mutation that combines two or more sets of chromosomes from different species">allopolyploid</dfn> organism.</p>
双向文本
bdo 可用于反转文本的**方向**,并可用于显示从右到左阅读的语言。必需属性 dir 的值可以是 ltr(从左到右)或 rtl(从右到左)。
<bdo dir="rtl">god lmth</bdo>
编辑
ins 和 del 分别用于显示编辑的**插入**和**删除**。严格来说,它们不限于文本,可以用于大段内容,但通常,它们的使用是适度的,就像文字处理器中的“修订”功能一样。
它们可以具有 datetime 属性来指示编辑发生的时间,以及 cite 属性,指向一个描述为什么进行编辑的说明。
<p>I have decided to <del datetime="2013-01-26">decrease</del> <ins cite="http://www.icecreamforall.com/changeofpolicy/">increase</ins> the amount of free ice cream that the State will provide for its citizens.</p>
