Explain ordered list and unordered list
Answers
Ordered list:An ordered list defines a list of items in which the order of items is fixed or order of items matters . Ot is also called numbered list. The list items are enclosed within <ol>and </ol> tags. Values of list style property are demical , roman numerals and alphabets .
Unordered list: An unordered list defines a list of items in which the ordering of items is not fixed or is not important. It is also called bulleted list. The list items are defined using <ul> and </ul> tags . Values of list style property are circle, disc and square.
☆ Ordered List ☆
If you are required to put your items in a numbered list instead of bulleted, then HTML ordered list will be used. This list is created by using <ol> tag. The numbering starts at one and is incremented by one for each successive ordered list element tagged with <li>.
Example:
<html>
<head>
<title>HTML ordered List</title>
</head>
<body>
<ol>
<li>Ginger</li>
<li>Potato</li>
<li>Radish</li>
</ol>
</body>
</html>
☆ Unordered List ☆
An unordered list is a collection of related items that have no special order or sequence. This list is created by using HTML <ul> tag. Each item in the list is marked with a bullet.
Example:
<html>
<head>
<title>HTML Unordered List</title>
</head>
<body>
<ul>
<li>Ginger</li>
<li>Potato</li>
<li>Radish</li>
</ul>
</body>
</html>