18 December 2016

Lecture 7: Lists


There are basically two types of lists in HTML: Ordered and Un-ordered.

Here is an example of an un-ordered list:



Each list item should be in <li> --- </li> tags and the whole list should be inside an <ul> --- </ul> tag. 

Remember that nothing except the li elements are allowed inside the <ul> --- </ul>. So the list title is not inside the ul tag. (The div tag is used just to keep the list with its title separate from other possible contents. It is not really necessary.)

Next, here is an example of an ordered list:



The ordered list is usually used when the list contains something that should be in an specific order. 

There can also be nested lists. 

No comments:

Post a Comment