There are two type of HTML lists available
- Ordered List
- Unordered List
Ex:
Ordered List | Unordered List |
---|---|
|
|
- HTML Ordered List
An Ordered List of HTML starts with <ol> tag and ends with </ol> tag. Each line of the list starts with <li> and ends with </li> tags.
Ex: Simple Ordered List
<ol>
<li>List 1</li>
<li>List 2</li>
</ol>
Ordered List with sub levels
<ol>
<li>List 1</li>
<li>List 2</li>
<ol>
<li>Sub List 1</li>
<li>Sub List 2</li>
</ol>
</ol> - HTML Unordered List
An Unordered List of HTML starts with <ul> tag and ends with </ul> tag. Each line of the list starts with <li> and ends with </li> tags.
Ex: Simple Unordered List
<ul>
<li>List 1</li>
<li>List 2</li>
</ul>
Unordered List with sub levels
<ul>
<li>List 1</li>
<li>List 2</li>
<ul>
<li>Sub List 1</li>
<li>Sub List 2</li>
</ul>
</ul> - HTML Definition List
HTML definition List is a descriptive list, it includes the description of the each list item. A Definition List starts with <dl> tag and ends with </dl> tag. Description of the list notifies with <dd>tag. Description of the list item is conjuct with the List item by <dt> tag
Ex:
<dl>
<dt>New Cars</dt>
<dd> - These are brand New Full option Cars imported from Japan. </dd>
<dt>Old Cars</dt>
<dd> - These are Recondition & used Cars. </dd>
</dl>
Out put
New Cars
- These are brand New Full option Cars imported from Japan.
Old Cars
- These are Recondition & used Cars.
No comments:
Post a Comment