Text: Addresses, Definitions, Bi-directional, and Editorial
OK, so we should all be know by now that there are lots of tags for text. We’ve done paragraphs, we’ve done headings, we’ve even done abbreviations, quotations, and code. And there are several other, more obscure tags that can be used. Obscure because you won’t find them plastered around the Web, not because they are unhelpful. If you find you have text that fits these elements’ descriptions, you will have a nicer, richer, more meaningful HTML page if you use them.
Addresses
address
should be used specifically for the contact details relating either to the entire web page (and so only used once) or to an article
element (see Sectioning). It’s isn’t, as it might at first appear, for marking up any old address willy-nilly.
<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>
Definition terms
dfn
is a definition term and is used to highlight the first use of a term. Like abbr
, the title
attribute can be used to describe the term.
<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>
Bi-directional text
bdo
can be used to reverse the direction of the text, and can be used to display languages that read right to left. The value of the required attribute dir
can be ltr
(left to right) or rtl
(right to left).
<bdo dir="rtl">god lmth</bdo>
Editorial
ins
and del
are used to display editorial insertions and deletions respectively. Strictly speaking, they aren’t limited to text and can be used over whole swathes of content but, typically, they are used in moderation just like “Track Changes” feature in word processors tend to be.
They can have the attributes datetime
to indicate when the edit was made and cite
, to point to a description as to why the edit has been made.
<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>