Old 02-07-2003, 11:21   #1 (permalink)
Brown
volkswagen yellow & gold
 
Brown's Avatar
 
Join Date: Apr 2003
Location: london, england.
Posts: 6,214
list elements

i've looked through the spec but its not clear. it tells you what you how they work but not what you're not allowed to do.

question: does a <LI> have to site within a <UL> ?

eg:

proper way of doing it

<UL>
<LI>element 1</LI>
<LI>element 2</LI>
</UL>

is this allowed?

<LI>element 1</LI>
<LI>element 2</LI>

it means that the list is not indented.

thoughts, or preferably (but unlikely knowing you lot) answers.

ta.

brn.
  Reply With Quote
Old 02-07-2003, 12:08   #2 (permalink)
Stickman
Dr. Lucien Sanchez
 
Stickman's Avatar
 
Join Date: Mar 2003
Location: UK
Posts: 5,632
<ul> is 'unordered list'.
<li> is 'list item'.

And fwiw, <ol> is 'ordered list' and will give you numbers instead of bullets.

The <li> tag is a component of list tags (such as ul, ol etc), so yes - it should be within the <ul> </ul>. You can easily style lists with css though, if you want to lose the indent.

http://www.htmlhelp.com/reference/html40/lists/li.html
  Reply With Quote
Old 09-07-2003, 14:03   #3 (permalink)
beseku
Rod in your face...
 
beseku's Avatar
 
Join Date: Jun 2003
Location: Guildford
Posts: 99
Send a message via MSN to beseku
There is also a good article at alistaprt.

http://www.alistapart.com/stories/taminglists/
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8