Skip to: content, navigation

by Ian Lloyd

type (HTML attribute)

Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Full Full Full Full
Spec
Depr. Version
Yes HTML 2
type="
{ circle | disc | square }
"

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:

unordered list with list glyph type of circle

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:

unordered list with list glyph type of circle

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

IE5.5Full
6.0Full
7.0Full
Firefox1.0Full
1.5Full
2.0Full
Safari1.3Full
2.0Full
3.0Full
Opera9.2Full
9.5Full

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.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters