HTML and CSS Reference
In-Depth Information
tag, for instance, to assign your own bullet icon image, instead of us-
ing the common
circle, disc
, or
square
. The
class
attribute lets you
apply the style of a predefined class of the
<ul>
tag to the contents of
the unordered list. The value of the
class
attribute is the name of a
style defined in some document-level or externally defined stylesheet.
For more information, see
Chapter 8
. [
Inline Styles: The style Attribute,
7.1.1.4. The lang and dir attributes
The
lang
attribute lets you specify the language used within a list, and
dir
lets you advise the browser in which direction the text should be
displayed. The value of the
lang
attribute is any of the International Or-
ganization for Standardization (ISO) standard two-character language
abbreviations, including an optional language modifier. For example,
adding
lang=en-UK
tells the browser that the list is in English ("en")
as spoken and written in the United Kingdom ("UK"). Presumably, the
browser may make layout or typographic decisions based upon your lan-
guage choice. [
The lang attribute, 3.6.1.2
]
The
dir
attribute tells the browser in which direction to display the list
contentsfrom left to right (
dir=ltr
), like English and French, or from
7.1.1.5. The id and title attributes
Use the
id
attribute to specially label the unordered list. An acceptable
value is any quote-enclosed string that uniquely identifies the list and
can later be used to unambiguously reference the list in a hyperlink tar-
get, for automated searches, as a stylesheet selector, and for a host of
other applications. [
The id attribute, 4.1.1.4
]