HTML Lists
An ordered list:
|
An unordered list:
|
HTML Unordered ListsAn unordered list starts with the <ul> tag. Each list item starts with the <li> tag.The list items are marked with bullets (typically small black circles).
<ul>
<li>Coffee</li> <li>Milk</li> </ul>
HTML Ordered ListsAn ordered list starts with the <ol> tag. Each list item starts with the <li> tag.The list items are marked with numbers.
<ol>
<li>Coffee</li> <li>Milk</li> </ol>
HTML Definition ListsA definition list is a list of items, with a description of each item.The <dl> tag defines a definition list. The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list):
<dl>
<dt>Coffee</dt> <dd>- black hot drink</dd> <dt>Milk</dt> <dd>- white cold drink</dd> </dl>
HTML List Tags
HTML <ol> TagExample2 different ordered lists:
<ol>
<li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> <ol start="50"> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> HTML <ul> TagExampleAn unordered HTML list:
<ul>
<li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> HTML <li> TagExampleOne ordered (<ol>) and one unordered (<ul>) HTML list:
<ol>
<li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> HTML <dl> TagExampleA definition list, with items and descriptions:
<dl>
<dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> HTML <dt> TagExampleA definition list, with items and descriptions:
<dl>
<dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> HTML <dd> TagExampleA definition list, with items and descriptions:
<dl>
<dt>Coffee</dt> <dd>Black hot drink</dd> <dt>Milk</dt> <dd>White cold drink</dd> </dl> |
No comments: