HTML and CSS Reference
In-Depth Information
7.1.1.1. The type attribute
The graphical browsers automatically bullet each <li> -tagged item in an
unordered list. Netscape and Firefox use a diamond like that shown in
Figure 7-1 , whereas Internet Explorer and Opera use a solid circle, for
example. Browsers that support HTML 3.2 and later versions, includ-
ing 4.0 and 4.01, as well as XHTML 1.0, let you use the type attribute
to specify which bullet symbol you'd rather have precede items in an
unordered list. This attribute may have the value of disc, circle , or
square . All the items within that list thereafter use the specified bullet
symbol, unless an individual item overrides the list bullet type, as de-
scribed later in this chapter.
With the advent of standard Cascading Style Sheets (CSS), the World
Wide Web Consortium (W3C) has deprecated the type attribute in HTML
4 and in XHTML. Expect it to disappear.
7.1.1.2. Compact unordered lists
If you like wide-open spaces, you'll hate the optional compact attribute
for the <ul> tag. It tells the browser to squeeze the unordered list into an
even smaller, more compact text block. Typically, the browser reduces
the line spacing between list items; it also may reduce the indentation
between list items, if it does anything at all with indentation (usually it
doesn't).
Some browsers ignore the compact attribute, so you shouldn't depend on
its formatting attributes. Also, the attribute is deprecated in the HTML 4
and XHTML standards, so it hasn't long to live.
7.1.1.3. The style and class attributes
The style and class attributes bring CSS-based display control to lists,
providing far more comprehensive control than you would get through
individual attributes like type . Combine the style attribute with the <ul>
 
Search WWH ::




Custom Search