One of the main advantages of the Web is that nearly everyone can use it. The same document may be rendered in very different ways on different devices. This is the reason why HTML, the markup language used for most text on WWW, specifies semantics of documents instead of their appearance. Therefore many tags and attributes in HTML are not visually significant, but they can it easier to get useful information from the text. This post lists three common things which can be improved with such elements.
- acronyms
Many text use large numbers of acronyms and abbreviations, but their meaning is not always remembered by the readers. Many acronyms also have more than one meaning, e.g. technical texts about AMD GPU support on GNU/Linux use the DRM acronym in two meanings – one very useful and one very harmful.
The solution is to specify the meaning using the
titleattribute of theacronymelement, in the GPU example it would be:<acronym title="Direct Rendering Manager">DRM</acronym> allows more optimal use of modern hardware.
I use this element for first use of each acronym in all posts on my blog. The HTML 4.01 specification describes also the
abbrelement used for abbreviations. I’m not sure which one of them should be used in which situation.- link titles
It is nice to know where a hyperlink leads. Therefore it should be appropriately described, by text and additional information provided using the
titleattribute. Some sites have readable URIs, but they should not be the only information allowing a user to decide if the page linked to is used. Using the same example as previous, link with a title may be written in HTML as<a href="http://en.wikipedia.org/wiki/Direct_Rendering_Manager" title="Wikipedia: Direct Rendering Manager">very useful</a>
Many guidelines for using link titles are specified in Alertbox by Jakob Nielsen. The simplest rules to follow when using link titles is to not duplicate nearby information in them and to provide name of the resource linked to (very useful when the context does not specify this and the URI is numeric).
- definition lists
In this list it is probably useful to quickly scan names of its elements and read the more useful ones. Definition lists are formatted for such use. In HTML they are specified using three elements –
dlcontains the whole list, the elements of which aredtcontaining the defined term andddcontaining the definition (each term may have many definition and each definition may have many terms).Unlike the previous elements, definition lists are equally useful in print. This might make them popular and easy to use correctly, although commonly itemized lists with term and definition separated by a dash are used instead. In my opinion the lack of support for definition lists in a popular word processing package contributes to this (fortunately LaTeX and wikis have equally good support for this as for the other types of lists).
They clearly should be used for definitions, but the HTML specification suggests using them for dialogue, although there are arguments against it.
These elements have also a disadvantage – sites without them are probably even less usable for people who correctly specify acronyms, link titles and definition lists.
