Sunday, October 10, 2010

HTML List

This section lists the tags often used with HTML lists:
<ol>, <ul>, and
<li>.
<ol>The <ol>tag specifies that the following list is ordered.  <ul>The <ul>tag specifies that the following list is unordered.
<li>
The </li>
<li> tag lists each item, whether ordered or numbered. Note that each item is indented.

Example 1:  Ordered list.

HTML:
<ol>
<li>list 1.</li>
<li>list 2.</li>
</ol>

Display
  1. list 1.
  2. list 2.
Example 2:  Unordered list.
HTML:

<ul>
<li>Unordered list 1.</li>
<li>Unordered list 2.</li>
</ul> 


Display:
  • Unordered list 1.
  • Unordered list 2.
You can use type attribute to specify the type of bullet you like. By default its is a disc. Following are the possible way:
<ul type="square">
<ul type="disc">
<ul type="circle">

    No comments:

    Post a Comment