HTML LIST (Ordered List)

SEOSIKHO 02:00:00
ORDERED LIST

This type of list has numbering or alphabets in front of its items.

■ <ol> tag is used here which stands for ordered list.

■ It is used in pairs.

■ Every list item is enclosed in <li> tag.

type attributes

It defines which type of bullet will be used. It may have one of the following values-

1                    a                     A                  i                  I

Syntax

 <ol type= "1|a|A|i|I" start= "any numeric value">
<li>any content</li>
<li>any content</li>
...
...
</ol>


EXAMPLE WITH STEP WISE:

1       Bullet using number .


1 Open Notepad and past below code 



<!DOCTYPE html>
<html>
<body>
<ol type="1" start="5" >
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
</body>
</html>

2  save as list.html


Output:

  1. First item
  2. Second item
  3. Third item
  4. Fourth item

2  Bullet using alphabat

1 Open Notepad and copy code.



<!DOCTYPE html>
<html>
<body>
<ol type="a" start="c" >
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
</body>
</html>

Output: 

  1. First item
  2. Second item
  3. Third item
  4. Fourth item

3 .  Bullet using Roman Number


1 Open Notepad and copy code.



<!DOCTYPE html>
<html>
<body>
<ol type="I" start="3" >
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
</body>
</html>

OUTPUT:

  1. First item
  2. Second item
  3. Third item
  4. Fourth item


Share this

Related Posts

Previous
Next Post »