List Tags

Unordered list : <ul>

An unordered list is a bulleted list of items and defined using the tags <ul> and </ul>. Each item in the list is defined using tags <li> and </li>. The default bullet style is a disc (a filled circle). You can change the bullet style by setting the type attribute to circle, square or disc.

Code:

<ul type="square">
<li> Apple </li>
<li> Orange </li>
<li> Grapes </li>
</ul>

Displayed as:

  • Apple
  • Orange
  • Grapes

Ordered list: <ol>

An ordered list is a numbered list of items and defined using the tags <ol> and </ol>. Each item in the list is defined using tags <li> and </li>. The default numbering style is 1,2,3,.. You can change the numbering style by setting the type attribute to one of the following :
1 - for numbers
a - for lower case letters
A - for upper case letters
i - for lower case roman numerals
I - upper case roman numerals

Code:

<ol type="I">
<li> First </li>
<li> Second </li>
<li> Third </li>
</ol>

Displayed as:

  1. First
  2. Second
  3. Third
Last Updated: 30-April-2013


Post a comment

Name

Your Comment

Email (We dont publish it)

Comments

Nothing yet..be the first to share wisdom.