type (HTML attribute)
Example
This example shows
type applied to the navigation block we saw
earlier:
<ul type="circle"> <li><a href="/">Home</a></li> <li><a href="/about/">About Us</a></li> <li><a href="/portfolio/">Portfolio</a></li> <li><a href="/clients/">Clients</a></li> <li><a href="/contact/">Contact Us </a></li> </ul>
This code would render as follows:

Here’s
the same list, using a type value of
"square":
<ul type="square"> <li><a href="/">Home</a></li> <li><a href="/about/">About Us</a></li> <li><a href="/portfolio/">Portfolio</a></li> <li><a href="/clients/">Clients</a></li> <li><a href="/contact/">Contact Us </a></li> </ul>
This code would render as follows:

Description
The type
attribute allows the developer to apply some basic alternative styling to
the bullet point that accompanies each list item.
This attribute is now deprecated, and is highly presentational in its nature. The desired visual effects can all be achieved with CSS and, as such, this attribute should not be used—it is presented here for informational purposes only.
Value
The options are
"disc" (the browser default—a filled circle),
"circle" (an outline of a circle that’s not filled in),
and "square" (a filled square, not an
outline).
Compatibility
| IE | 5.5 | Full |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
| 9.5 | Full |
Good support is provided for
the type attribute. However, given that it’s a
deprecated attribute whose effects can be achieved—and massively improved
upon (for example, you can use background imagery of your choosing, rather
than picking from a small selection of basic glyphs)—using CSS, you can
avoid using this attribute altogether.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

