The UL Element: Unordered Lists


The <UL> Element: Unordered Lists

You use the <UL> element to create unordered lists that usually have some visual element, such as a bullet in front of every item. Here's an example:

(Listing 14-07.html on the web site)
 <HTML>      <HEAD>          <TITLE>              An Unordered List          </TITLE>      </HEAD>      <BODY>          <H1>              Creating An Unordered List          </H1>          Buying a computer? Let's consider:  <UL>   <LI> Price   <LI> CPU Speed   <LI> Memory   <LI> Disk space   <LI> CD-ROM/DVD speed   </UL>  </BODY>  </HTML> 

You can see this page in Figure 14.3.

Figure 14.3. Using an unordered list.

graphics/14fig03.gif

You can find the JavaScript properties for the <UL> element in Table 14.4. Remember that JavaScript's core HTML properties, methods , and events, which we covered in Chapters 5 and 6, apply to this element as well.

Table 14.4. The Properties of the <UL> Element (See Chapters 5 and 6 for the JavaScript core HTML properties, methods, and events that also apply to this element.)

Property

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

compact

     

x

   

x

x

x

x

 

Read/write

 

Supposedly affects the spacing of the text and the list numbering/ bulleting, but in fact has no effect. The COMPACT attribute is deprecated in HTML 4.01.

type

     

x

   

x

x

x

x

 

Read/write

 

Specifies the type of list item label; set to "disc" (default solid bullet), "square" (solid square), or "circle" (hollow bullet). Deprecated in HTML 4.01.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net