Saturday 28 September 2013

Html Lists Ordered Lists Unordered Lists and Definition Lists

UL (Unordered List)
Tag : <ul></ul>
Unordered list is one of the mostly used html tag. This is used to display data in a list.
<UL>
<LI>SimCity</LI>
<LI>Quake</LI>
<LI>Bridge</LI>
</UL>
Result
• SimCity
• Quake
• Bridge
The default “bullet” for these lists is a “disc” that, however, can be changed to a “circle” or a “square” with the help of the type attribute.

OL (Ordered Lists)
Tag : <ol></ol>

Unordered list is one of the mostly used html tag. This is used to display data in an ordered list.
<OL>
<LI>SimCity</LI>
<LI>Quake</LI>
<LI>Bridge</LI>
</OL>
Result
1. SimCity
2. Quake
3. Bridge
We can give a ‘type’ to get the specific numbering. For example
<OL type = “a”>
<LI>SimCity</LI>
<LI>Quake</LI>
<LI>Bridge</LI>
</OL>
Result
a. SimCity
b. Quake
c. Bridge
Ordered List Types

Type
Result
“A”
A, B, C, …
“a”
a, b, c, …
“I”
I, II, III, IV, …
“i”
i, ii, iii, iv, …
“1”
1, 2, 3, …

How would one start an ordered list with
something other than 1
then use as for any starting number like we have 25 here
<OL start = “25”>
<LI>SimCity</LI>
<LI>Quake</LI>
<LI>Bridge</LI>
</OL>

DL (Definition List)
Tag :<dl></dl>
This is another type of list which displays the data in proper way to viewers. For example
<DL>
<DT>SimCity</DT>
<DD> 
A great simulation game in which one build cities
</DD>
<DT>Quake</DT>
<DD>
One of the best of the shoot-em-up genre
 </DD>
</DL>
Result
SimCity
A great simulation game in which one build cities
Quake

One of the best of the shoot-em-up genre

No comments:

Post a Comment