lists.html
html-spec/specifications/prose/html-4.01/struct/lists.html · 721 line(s) · html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Lists in HTML documents</title>
<link rel="previous" href="text.html">
<link rel="next" href="tables.html">
<link rel="contents" href="../cover.html#toc">
<link rel="stylesheet" type="text/css" href=
"http://www.w3.org/StyleSheets/TR/W3C-REC">
<link rel="STYLESHEET" href="../style/default.css" type="text/css">
</head>
<body>
<div class="navbar" align="center"> <a href="text.html">previous</a>
<a href="tables.html">next</a> <a href="../cover.html#minitoc">
contents</a> <a href="../index/elements.html">elements</a> <a
href="../index/attributes.html">attributes</a> <a href=
"../index/list.html">index</a>
<hr></div>
<h1 align="center"><a name="h-10">10</a> Lists</h1>
<div class="subtoc">
<p><strong>Contents</strong></p>
<ol>
<li><a class="tocxref" href="#h-10.1">Introduction to lists</a></li>
<li><a class="tocxref" href="#h-10.2"><span class="index-def" title=
"list::unordered">Unordered lists</span> (<samp class="einst2">UL</samp>),
<span class="index-def" title="list::ordered">ordered lists</span> (<samp
class="einst2">OL</samp>), and list items (<samp class=
"einst2">LI</samp>)</a></li>
<li><a class="tocxref" href="#h-10.3"><span class="index-def" title=
"list::definition list">Definition lists</span>: the <samp class="einst2">
DL</samp>, <samp class="einst2">DT</samp>, and <samp class="einst2">DD</samp>
elements</a>
<ol>
<li><a class="tocxref" href="#h-10.3.1">Visual rendering of lists</a></li>
</ol>
</li>
<li><a class="tocxref" href="#h-10.4">The <samp class="einst2">DIR</samp> and
<samp class="einst2">MENU</samp> elements</a></li>
</ol>
</div>
<h2><a name="h-10.1">10.1</a> Introduction to lists</h2>
HTML offers authors several mechanisms for specifying lists of information. All
lists must contain one or more list elements. Lists may contain:
<ul>
<li>Unordered information.</li>
<li>Ordered information.</li>
<li>Definitions.</li>
</ul>
<p>The previous list, for example, is an unordered list, created with the <a
href="lists.html#edef-UL" class="noxref"><samp class="einst">UL</samp></a>
element:</p>
<pre class="example">
<UL>
<LI>Unordered information.
<LI>Ordered information.
<LI>Definitions.
</UL>
</pre>
<p>An ordered list, created using the <a href="lists.html#edef-OL" class=
"noxref"><samp class="einst">OL</samp></a> element, should contain information
where order should be emphasized, as in a recipe:</p>
<ol>
<li>Mix dry ingredients thoroughly.</li>
<li>Pour in wet ingredients.</li>
<li>Mix for 10 minutes.</li>
<li>Bake for one hour at 300 degrees.</li>
</ol>
<p>Definition lists, created using the <a href="lists.html#edef-DL" class=
"noxref"><samp class="einst">DL</samp></a> element, generally consist of a
series of term/definition pairs (although definition lists may have other
applications). Thus, when advertising a product, one might use a definition
list:</p>
<dl>
<dt><strong>Lower cost</strong></dt>
<dd>The new version of this product costs significantly less than the previous
one!</dd>
<dt><strong>Easier to use</strong></dt>
<dd>We've changed the product so that it's much easier to use!</dd>
<dt><strong>Safe for kids</strong></dt>
<dd>You can leave your kids alone in a room with this product and they won't
get hurt (not a guarantee).</dd>
</dl>
<p>defined in HTML as:</p>
<pre class="example">
<DL>
<DT><STRONG>Lower cost</STRONG>
<DD>The new version of this product costs significantly less than the
previous one!
<DT><STRONG>Easier to use</STRONG>
<DD>We've changed the product so that it's much easier to use!
<DT><STRONG>Safe for kids</STRONG>
<DD>You can leave your kids alone in a room with this product and
they won't get hurt (not a guarantee).
</DL>
</pre>
<p>Lists may also be nested and different list types may be used together, as
in the following example, which is a definition list that contains an unordered
list (the ingredients) and an ordered list (the procedure):</p>
<dl>
<dt><strong>The ingredients:</strong></dt>
<dd>
<ul>
<li>100 g. flour</li>
<li>10 g. sugar</li>
<li>1 cup water</li>
<li>2 eggs</li>
<li>salt, pepper</li>
</ul>
</dd>
<dt><strong>The procedure:</strong></dt>
<dd>
<ol>
<li>Mix dry ingredients thoroughly.</li>
<li>Pour in wet ingredients.</li>
<li>Mix for 10 minutes.</li>
<li>Bake for one hour at 300 degrees.</li>
</ol>
</dd>
<dt><strong>Notes:</strong></dt>
<dd>The recipe may be improved by adding raisins.</dd>
</dl>
<p>The exact presentation of the three list types depends on the user agent. We
discourage authors from using lists purely as a means of indenting text. This
is a stylistic issue and is properly handled by style sheets.</p>
<h2><a name="h-10.2">10.2</a> <span class="index-def" title="list::unordered">
<a name="didx-list">Unordered lists</a></span> (<a name="edef-UL"><samp class=
"edef">UL</samp></a>), <span class="index-def" title="list::ordered"><a name=
"didx-list-1">ordered lists</a></span> (<a name="edef-OL"><samp class=
"edef">OL</samp></a>), and list items (<a href="lists.html#edef-LI" class=
"noxref"><samp class="einst">LI</samp></a>)</h2>
<div class="dtd-fragment">
<pre class="dtd-fragment">
<!ELEMENT <a href="lists.html#edef-UL" class="noxref"><samp class=
"einst">UL</samp></a> - - (LI)+ -- unordered list -->
<!ATTLIST UL
<a href=
"../sgml/dtd.html#attrs">%attrs;</a> -- <a href=
"../sgml/dtd.html#coreattrs">%coreattrs</a>, <a href=
"../sgml/dtd.html#i18n">%i18n</a>, <a href=
"../sgml/dtd.html#events">%events</a> --
>
<!ELEMENT <a href="lists.html#edef-OL" class="noxref"><samp class=
"einst">OL</samp></a> - - (LI)+ -- ordered list -->
<!ATTLIST OL
<a href=
"../sgml/dtd.html#attrs">%attrs;</a> -- <a href=
"../sgml/dtd.html#coreattrs">%coreattrs</a>, <a href=
"../sgml/dtd.html#i18n">%i18n</a>, <a href=
"../sgml/dtd.html#events">%events</a> --
>
</pre>
</div>
<p><em>Start tag: <strong>required</strong>, End tag: <strong>
required</strong></em></p>
<div class="dtd-fragment">
<pre class="dtd-fragment">
<!ELEMENT <a href="lists.html#edef-LI" class="noxref"><samp class=
"einst">LI</samp></a> - O (<a href=
"../sgml/dtd.html#flow">%flow;</a>)* -- list item -->
<!ATTLIST LI
<a href=
"../sgml/dtd.html#attrs">%attrs;</a> -- <a href=
"../sgml/dtd.html#coreattrs">%coreattrs</a>, <a href=
"../sgml/dtd.html#i18n">%i18n</a>, <a href=
"../sgml/dtd.html#events">%events</a> --
>
</pre>
</div>
<p><em>Start tag: <strong>required</strong>, End tag: <strong>
optional</strong></em></p>
<div class="adef-list">
<p><em>Attribute definitions</em></p>
<dl>
<dt><a name="adef-type-LI"><samp class="adef">type</samp></a><a name=
"adef-type-UL"> </a> =<a name="adef-type-OL"> </a> <em>
style-information</em> <a href="../types.html#case-insensitive">[CI]</a></dt>
<dd><a href="../conform.html#deprecated"><strong>Deprecated.</strong></a> This
attribute sets the style of a list item. Currently available values are
intended for visual user agents. <a href="#type-values">Possible values</a> are
described below (along with case information).</dd>
<dt><a name="adef-start"><samp class="adef">start</samp></a> = <a href=
"../types.html#type-number"><em>number</em></a> <a href=
"../types.html#case-neutral">[CN]</a></dt>
<dd><a href="../conform.html#deprecated"><strong>Deprecated.</strong></a> For
<a href="lists.html#edef-OL" class="noxref"><samp class="einst">OL</samp></a>
only. This attribute specifies the starting number of the first item in an
ordered list. The default starting number is "1". Note that while the value of
this attribute is an integer, the corresponding label may be non-numeric. Thus,
when the list item style is uppercase latin letters (A, B, C, ...), <samp>
start=3</samp> means "C". When the style is lowercase roman numerals, <samp>
start=3</samp> means "iii", etc.</dd>
<dt><a name="adef-value-LI"><samp class="adef">value</samp></a> = <a href=
"../types.html#type-number"><em>number</em></a> <a href=
"../types.html#case-neutral">[CN]</a></dt>
<dd><a href="../conform.html#deprecated"><strong>Deprecated.</strong></a> For
<a href="lists.html#edef-LI" class="noxref"><samp class="einst">LI</samp></a>
only. This attribute sets the number of the current list item. Note that while
the value of this attribute is an integer, the corresponding label may be
non-numeric (see the <a href="lists.html#adef-start" class="noxref"><samp
class="ainst">start</samp></a> attribute).</dd>
<dt><a name="adef-compact"><samp class="adef">compact</samp></a> <a href=
"../types.html#case-insensitive">[CI]</a></dt>
<dd><a href="../conform.html#deprecated"><strong>Deprecated.</strong></a> When
set, this boolean attribute gives a hint to visual user agents to render the
list in a more compact way. The interpretation of this attribute depends on the
user agent.</dd>
</dl>
</div>
<div class="aref-list">
<p><em>Attributes defined elsewhere</em></p>
<ul>
<li><a href="global.html#adef-id" class="noxref"><samp class="ainst">
id</samp></a>, <a href="global.html#adef-class" class="noxref"><samp class=
"ainst">class</samp></a> (<a href=
"../struct/global.html#id-and-class">document-wide identifiers</a>)</li>
<li><a href="dirlang.html#adef-lang" class="noxref"><samp class="ainst">
lang</samp></a> (<a href="../struct/dirlang.html#language-info">language
information</a>), <a href="dirlang.html#adef-dir" class="noxref"><samp class=
"ainst">dir</samp></a> (<a href="../struct/dirlang.html#bidirection">text
direction</a>)</li>
<li><a href="global.html#adef-title" class="noxref"><samp class="ainst">
title</samp></a> (<a href="../struct/global.html#title">element title</a>)</li>
<li><a href="../present/styles.html#adef-style" class="noxref"><samp class=
"ainst">style</samp></a> (<a href="../present/styles.html#style-element">inline
style information</a>)</li>
<li><a href="../interact/scripts.html#adef-onclick" class="noxref"><samp class=
"ainst">onclick</samp></a>, <a href="../interact/scripts.html#adef-ondblclick"
class="noxref"><samp class="ainst">ondblclick</samp></a>, <a href=
"../interact/scripts.html#adef-onmousedown" class="noxref"><samp class="ainst">
onmousedown</samp></a>, <a href="../interact/scripts.html#adef-onmouseup"
class="noxref"><samp class="ainst">onmouseup</samp></a>, <a href=
"../interact/scripts.html#adef-onmouseover" class="noxref"><samp class="ainst">
onmouseover</samp></a>, <a href="../interact/scripts.html#adef-onmousemove"
class="noxref"><samp class="ainst">onmousemove</samp></a>, <a href=
"../interact/scripts.html#adef-onmouseout" class="noxref"><samp class="ainst">
onmouseout</samp></a>, <a href="../interact/scripts.html#adef-onkeypress"
class="noxref"><samp class="ainst">onkeypress</samp></a>, <a href=
"../interact/scripts.html#adef-onkeydown" class="noxref"><samp class="ainst">
onkeydown</samp></a>, <a href="../interact/scripts.html#adef-onkeyup" class=
"noxref"><samp class="ainst">onkeyup</samp></a> (<a href=
"../interact/scripts.html#events">intrinsic events</a>)</li>
</ul>
</div>
<p>Ordered and unordered lists are rendered in an identical manner except that
visual user agents number ordered list items. User agents may present those
numbers in a variety of ways. Unordered list items are not numbered.</p>
<p>Both types of lists are made up of sequences of list items defined by the <a
name="edef-LI"><samp class="edef">LI</samp></a> element (whose end tag may be
omitted).</p>
<div class="example">
<p>This example illustrates the basic structure of a list.</p>
<pre>
<UL>
<LI> <em>... first list item...</em>
<LI> <em>... second list item...</em>
...
</UL>
</pre>
</div>
<p><span class="index-inst" title="list::nesting of"><a name="idx-list-3">Lists
may also be nested:</a></span></p>
<div class="deprecated-example">
<p><span class="example-title">DEPRECATED EXAMPLE:</span>
<br>
</p>
<pre>
<UL>
<LI> <em>... Level one, number one...</em>
<OL>
<LI> <em>... Level two, number one...</em>
<LI> <em>... Level two, number two...</em>
<OL start="10">
<LI> <em>... Level three, number one...</em>
</OL>
<LI> <em>... Level two, number three...</em>
</OL>
<LI> <em>... Level one, number two...</em>
</UL>
</pre>
</div>
<div class="note">
<p><em><span class="index-inst" title="list::numbering of"><a name=
"idx-list-4"><strong>Details about number order.</strong></a></span> In ordered
lists, it is not possible to continue list numbering automatically from a
previous list or to hide numbering of some list items. However, authors can
reset the number of a list item by setting its <samp class="ainst">value</samp>
attribute. Numbering continues from the new value for subsequent list items.
For example:</em></p>
<pre class="example">
<ol>
<li value="30"> makes this list item number 30.
<li value="40"> makes this list item number 40.
<li> makes this list item number 41.
</ol>
</pre>
</div>
<h2><a name="h-10.3">10.3</a> <span class="index-def" title="list::definition
list"><a name="didx-list-2">Definition lists</a></span>: the <a name="edef-DL">
<samp class="edef">DL</samp></a>, <a name="edef-DT"><samp class="edef">
DT</samp></a>, and <a name="edef-DD"><samp class="edef">DD</samp></a>
elements</h2>
<div class="dtd-fragment">
<pre class="dtd-fragment">
<!-- definition lists - DT for term, DD for its definition -->
<!ELEMENT <a href="lists.html#edef-DL" class="noxref"><samp class=
"einst">DL</samp></a> - - (DT|DD)+ -- definition list -->
<!ATTLIST DL
<a href=
"../sgml/dtd.html#attrs">%attrs;</a> -- <a href=
"../sgml/dtd.html#coreattrs">%coreattrs</a>, <a href=
"../sgml/dtd.html#i18n">%i18n</a>, <a href=
"../sgml/dtd.html#events">%events</a> --
>
</pre>
</div>
<p><em>Start tag: <strong>required</strong>, End tag: <strong>
required</strong></em></p>
<div class="dtd-fragment">
<pre class="dtd-fragment">
<!ELEMENT <a href="lists.html#edef-DT" class="noxref"><samp class=
"einst">DT</samp></a> - O (<a href=
"../sgml/dtd.html#inline">%inline;</a>)* -- definition term -->
<!ELEMENT <a href="lists.html#edef-DD" class="noxref"><samp class=
"einst">DD</samp></a> - O (<a href=
"../sgml/dtd.html#flow">%flow;</a>)* -- definition description -->
<!ATTLIST (DT|DD)
<a href=
"../sgml/dtd.html#attrs">%attrs;</a> -- <a href=
"../sgml/dtd.html#coreattrs">%coreattrs</a>, <a href=
"../sgml/dtd.html#i18n">%i18n</a>, <a href=
"../sgml/dtd.html#events">%events</a> --
>
</pre>
</div>
<p><em>Start tag: <strong>required</strong>, End tag: <strong>
optional</strong></em></p>
<div class="aref-list">
<p><em>Attributes defined elsewhere</em></p>
<ul>
<li><a href="global.html#adef-id" class="noxref"><samp class="ainst">
id</samp></a>, <a href="global.html#adef-class" class="noxref"><samp class=
"ainst">class</samp></a> (<a href=
"../struct/global.html#id-and-class">document-wide identifiers</a>)</li>
<li><a href="dirlang.html#adef-lang" class="noxref"><samp class="ainst">
lang</samp></a> (<a href="../struct/dirlang.html#language-info">language
information</a>), <a href="dirlang.html#adef-dir" class="noxref"><samp class=
"ainst">dir</samp></a> (<a href="../struct/dirlang.html#bidirection">text
direction</a>)</li>
<li><a href="global.html#adef-title" class="noxref"><samp class="ainst">
title</samp></a> (<a href="../struct/global.html#title">element title</a>)</li>
<li><a href="../present/styles.html#adef-style" class="noxref"><samp class=
"ainst">style</samp></a> (<a href="../present/styles.html#style-element">inline
style information</a>)</li>
<li><a href="../interact/scripts.html#adef-onclick" class="noxref"><samp class=
"ainst">onclick</samp></a>, <a href="../interact/scripts.html#adef-ondblclick"
class="noxref"><samp class="ainst">ondblclick</samp></a>, <a href=
"../interact/scripts.html#adef-onmousedown" class="noxref"><samp class="ainst">
onmousedown</samp></a>, <a href="../interact/scripts.html#adef-onmouseup"
class="noxref"><samp class="ainst">onmouseup</samp></a>, <a href=
"../interact/scripts.html#adef-onmouseover" class="noxref"><samp class="ainst">
onmouseover</samp></a>, <a href="../interact/scripts.html#adef-onmousemove"
class="noxref"><samp class="ainst">onmousemove</samp></a>, <a href=
"../interact/scripts.html#adef-onmouseout" class="noxref"><samp class="ainst">
onmouseout</samp></a>, <a href="../interact/scripts.html#adef-onkeypress"
class="noxref"><samp class="ainst">onkeypress</samp></a>, <a href=
"../interact/scripts.html#adef-onkeydown" class="noxref"><samp class="ainst">
onkeydown</samp></a>, <a href="../interact/scripts.html#adef-onkeyup" class=
"noxref"><samp class="ainst">onkeyup</samp></a> (<a href=
"../interact/scripts.html#events">intrinsic events</a>)</li>
</ul>
</div>
<p>Definition lists vary only slightly from other types of lists in that list
items consist of two parts: a term and a description. The term is given by the
<a href="lists.html#edef-DT" class="noxref"><samp class="einst">DT</samp></a>
element and is restricted to inline content. The description is given with a <a
href="lists.html#edef-DD" class="noxref"><samp class="einst">DD</samp></a>
element that contains block-level content.</p>
<div class="example">
<p>Here is an example:</p>
<pre>
<DL>
<DT>Dweeb
<DD>young excitable person who may mature
into a <EM>Nerd</EM> or <EM>Geek</EM>
<DT>Hacker
<DD>a clever programmer
<DT>Nerd
<DD>technically bright but socially inept person
</DL>
</pre>
</div>
<div class="example">
<p>Here is an example with multiple terms and descriptions:</p>
<pre>
<DL>
<DT>Center
<DT>Centre
<DD> A point equidistant from all points
on the surface of a sphere.
<DD> In some field sports, the player who
holds the middle position on the field, court,
or forward line.
</DL>
</pre>
</div>
<p>Another application of <a href="lists.html#edef-DL" class="noxref"><samp
class="einst">DL</samp></a>, for example, is for marking up dialogues, with
each <a href="lists.html#edef-DT" class="noxref"><samp class="einst">
DT</samp></a> naming a speaker, and each <a href="lists.html#edef-DD" class=
"noxref"><samp class="einst">DD</samp></a> containing his or her words.</p>
<h3><a name="h-10.3.1">10.3.1</a> <span class="index-inst" title="list::visual
rendering of"><a name="idx-list-5">Visual rendering of lists</a></span></h3>
<div class="note">
<p><em><strong>Note.</strong> The following is an informative description of
the behavior of some current visual user agents when formatting lists. Style
sheets allow better control of list formatting (e.g., for numbering,
language-dependent conventions, indenting, etc.).</em></p>
</div>
<p>Visual user agents generally indent nested lists with respect to the current
level of nesting.</p>
<p>For both <a href="lists.html#edef-OL" class="noxref"><samp class="einst">
OL</samp></a> and <a href="lists.html#edef-UL" class="noxref"><samp class=
"einst">UL</samp></a>, the <a href="lists.html#adef-type-LI" class="noxref">
<samp class="ainst-LI">type</samp></a> attribute specifies rendering options
for visual user agents.</p>
<p>For the <a href="lists.html#edef-UL" class="noxref"><samp class="einst">
UL</samp></a> element, <a name="type-values">possible values</a> for the <a
href="lists.html#adef-type-LI" class="noxref"><samp class="ainst-LI">
type</samp></a> attribute are <samp>disc</samp>, <samp>square</samp>, and
<samp>circle</samp>. The default value depends on the level of nesting of the
current list. These values are case-insensitive.</p>
<p>How each value is presented depends on the user agent. User agents should
attempt to present a "disc" as a small filled-in circle, a "circle" as a small
circle outline, and a "square" as a small square outline.</p>
<p>A graphical user agent might render this as:</p>
<p><img src="../images/lidisc.gif" alt="A possible rendering of a disc">for the
value "disc"
<br>
<img src="../images/licircle.gif" alt="A possible rendering of a circle">for
the value "circle"
<br>
<img src="../images/lisquare.gif" alt="A possible rendering of a square">for
the value "square"</p>
<p>For the <a href="lists.html#edef-OL" class="noxref"><samp class="einst">
OL</samp></a> element, possible values for the <a href=
"lists.html#adef-type-LI" class="noxref"><samp class="ainst-LI">type</samp></a>
attribute are summarized in the table below (they are case-sensitive):</p>
<table summary="Table showing values for the type attribute for the OL element,
the number systems they represent, and example numbers generated by each value"
border="1" width="80%" align="center">
<tr>
<th>Type</th>
<th colspan="2">Numbering style</th>
</tr>
<tr>
<td align="center">1</td>
<td align="center">arabic numbers</td>
<td align="center">1, 2, 3, ...</td>
</tr>
<tr>
<td align="center">a</td>
<td align="center">lower alpha</td>
<td align="center">a, b, c, ...</td>
</tr>
<tr>
<td align="center">A</td>
<td align="center">upper alpha</td>
<td align="center">A, B, C, ...</td>
</tr>
<tr>
<td align="center">i</td>
<td align="center">lower roman</td>
<td align="center">i, ii, iii, ...</td>
</tr>
<tr>
<td align="center">I</td>
<td align="center">upper roman</td>
<td align="center">I, II, III, ...</td>
</tr>
</table>
<p>Note that the <a href="lists.html#adef-type-LI" class="noxref"><samp class=
"ainst-LI">type</samp></a> attribute is <a href="../conform.html#deprecated">
deprecated</a> and <span class="index-inst" title="list::style sheets and"><a
name="idx-list-6">list styles should be handled through style
sheets.</a></span></p>
<div class="example">
<p>For example, using CSS, one may specify that the style of numbers for list
elements in a numbered list should be lowercase roman numerals. In the excerpt
below, every <a href="lists.html#edef-OL" class="noxref"><samp class="einst">
OL</samp></a> element belonging to the class "withroman" will have roman
numerals in front of its list items.</p>
<pre>
<STYLE type="text/css">
OL.withroman { list-style-type: lower-roman }
</STYLE>
<BODY>
<OL class="withroman">
<LI> Step one ...
<LI> Step two ...
</OL>
</BODY>
</pre>
</div>
<p>The rendering of a definition list also depends on the user agent. The
example:</p>
<pre>
<DL>
<DT>Dweeb
<DD>young excitable person who may mature
into a <EM>Nerd</EM> or <EM>Geek</EM>
<DT>Hacker
<DD>a clever programmer
<DT>Nerd
<DD>technically bright but socially inept person
</DL>
</pre>
<p>might be rendered as follows:</p>
<pre>
Dweeb
young excitable person who may mature into a <em>Nerd</em> or <em>Geek</em>
Hacker
a clever programmer
Nerd
technically bright but socially inept person
</pre>
<h2><a name="h-10.4">10.4</a> The <a name="edef-DIR"><samp class="edef">
DIR</samp></a> and <a name="edef-MENU"><samp class="edef">MENU</samp></a>
elements</h2>
<p><strong>DIR and MENU are <a href="../conform.html#deprecated">
deprecated</a>.</strong></p>
<p>See the <a href="../sgml/loosedtd.html#dir">Transitional DTD</a> for the
formal definition.</p>
<div class="aref-list">
<p><em>Attributes defined elsewhere</em></p>
<ul>
<li><a href="global.html#adef-id" class="noxref"><samp class="ainst">
id</samp></a>, <a href="global.html#adef-class" class="noxref"><samp class=
"ainst">class</samp></a> (<a href=
"../struct/global.html#id-and-class">document-wide identifiers</a>)</li>
<li><a href="dirlang.html#adef-lang" class="noxref"><samp class="ainst">
lang</samp></a> (<a href="../struct/dirlang.html#language-info">language
information</a>), <a href="dirlang.html#adef-dir" class="noxref"><samp class=
"ainst">dir</samp></a> (<a href="../struct/dirlang.html#bidirection">text
direction</a>)</li>
<li><a href="global.html#adef-title" class="noxref"><samp class="ainst">
title</samp></a> (<a href="../struct/global.html#title">element title</a>)</li>
<li><a href="../present/styles.html#adef-style" class="noxref"><samp class=
"ainst">style</samp></a> (<a href="../present/styles.html#style-element">inline
style information</a>)</li>
<li><a href="../interact/scripts.html#adef-onclick" class="noxref"><samp class=
"ainst">onclick</samp></a>, <a href="../interact/scripts.html#adef-ondblclick"
class="noxref"><samp class="ainst">ondblclick</samp></a>, <a href=
"../interact/scripts.html#adef-onmousedown" class="noxref"><samp class="ainst">
onmousedown</samp></a>, <a href="../interact/scripts.html#adef-onmouseup"
class="noxref"><samp class="ainst">onmouseup</samp></a>, <a href=
"../interact/scripts.html#adef-onmouseover" class="noxref"><samp class="ainst">
onmouseover</samp></a>, <a href="../interact/scripts.html#adef-onmousemove"
class="noxref"><samp class="ainst">onmousemove</samp></a>, <a href=
"../interact/scripts.html#adef-onmouseout" class="noxref"><samp class="ainst">
onmouseout</samp></a>, <a href="../interact/scripts.html#adef-onkeypress"
class="noxref"><samp class="ainst">onkeypress</samp></a>, <a href=
"../interact/scripts.html#adef-onkeydown" class="noxref"><samp class="ainst">
onkeydown</samp></a>, <a href="../interact/scripts.html#adef-onkeyup" class=
"noxref"><samp class="ainst">onkeyup</samp></a> (<a href=
"../interact/scripts.html#events">intrinsic events</a>)</li>
</ul>
</div>
<p>The <a href="lists.html#edef-DIR" class="noxref"><samp class="einst">
DIR</samp></a> element was designed to be used for creating multicolumn
directory lists. The <a href="lists.html#edef-MENU" class="noxref"><samp class=
"einst">MENU</samp></a> element was designed to be used for single column menu
lists. Both elements have the same structure as <a href="lists.html#edef-UL"
class="noxref"><samp class="einst">UL</samp></a>, just different rendering. In
practice, a user agent will render a <a href="lists.html#edef-DIR" class=
"noxref"><samp class="einst">DIR</samp></a> or <a href="lists.html#edef-MENU"
class="noxref"><samp class="einst">MENU</samp></a> list exactly as a <a href=
"lists.html#edef-UL" class="noxref"><samp class="einst">UL</samp></a> list.</p>
<p>We strongly recommend using <a href="lists.html#edef-UL" class="noxref">
<samp class="einst">UL</samp></a> instead of these elements.</p>
<div class="navbar" align="center">
<hr><a href="text.html">previous</a> <a href="tables.html">next</a>
<a href="../cover.html#minitoc">contents</a> <a href=
"../index/elements.html">elements</a> <a href=
"../index/attributes.html">attributes</a> <a href="../index/list.html">
index</a></div>
</body>
</html>