HTML lists are used to specify lists of information All lists may contain one or more list elements There are three different types of HTML lists:
- Ordered List or Numbered List (ol)
- Unordered List or Bulleted List (ul)
- Description List or Definition List (dl)
Example -
<body>
<ul>
<li>I am a list item!>
<li>I am a list item too!>
<li>I am a list item also!>
</ul>
</body>
Output -
- I am a list item!
- I am a list item too!
- I am a list item also!
Numbered List
Example -
<ol>
<li>Aries</li>
<li>Bingo</li>
<li>Leo</li>
<li>Oracle</li>
</ol>
Output -
- Aries
- Bingo
- Leo
- Oracle
Unordered List or Bulleted List
Example -
<ul>
<li>Aries</li>
<li>Bingo</li>
<li>Leo</li>
<li>Oracle</li>
</ul>
Output -
- Aries
- Bingo
- Leo
- Oracle
Description List or Definition List
Example -
The HTML details list is a list style supported by HTML and XHTML. This definition is also known as the list where entries are listed as a dictionary or encyclopedia.
<dl>
<dt>Aries</dt>
<dd>-One of the 12 horoscope sign.</dd>
<dt>Bingo</dt>
<dd>-One of my evening snacks</dd>
<dt>Leo</dt>
<dd>-It is also an one of the 12 horoscope sign.</dd>
<dt>Oracle</dt>
<dd>-It is a multinational technology corporation.</dd>
</dl>
Output -
0 comments:
Post a Comment