HTML and CSS Reference
In-Depth Information
Definition lists define definition terms ( dt ) and their descriptions ( dd ) (Listing 12-2).
Listing 12-2. A Definition List Example
<dl>
<dt>
<label>Web site development</label>
</dt>
<dt> RDF </dt>
<dd> A W3C acronym for Resource Description Framework, an XML specification for
metadata models. </dd>
<dt> RSS </dt>
<dd> Really Simple Syndication. An XML format for frequently updated content, e.g.,
news headlines, blog entries. </dd>
</dl>
List Accessibility
You can improve the accessibility of lists by adding elements such as accesskey and tabindex . Here's an example:
<ul>
<li>
<a href="http://www.example.com/" title="Home" accesskey="h" tabindex="1" >Home</a>
</li>
<li>
<a href="about/" title="Introduction" accesskey="a" tabindex="2" >About</a>
</li>
<li>
<a href="gallery/" title="Gallery" accesskey="g" tabindex="4" >Gallery</a>
</li>
<li>
<a href="shop/" title="Webstore of oil paintings" accesskey="s" tabindex="6" >Shop</a>
</li>
<li>
<a href="exhibition/" title="Exhibitions" accesskey="e" tabindex="7" >Exhibitions</a>
</li>
<li>
<a href="contact/" title="Address and phone" accesskey="c" tabindex="7" >Contact</a>
</li>
</ul>
Styling Lists
You can use unordered lists for more general purposes than ordered lists. Unordered lists are often used to build
menus. 3 Typical horizontal menus override the default display style, as shown in Listing 12-3, in order to render the
list items next to instead of below each other.
3 XHTML 2.0 also provides the more specific element nl for navigation lists, which is not supported by any other markup language.
 
Search WWH ::




Custom Search