HTML Lists
HTML Lists:
If you want
specify any information then HTML offers three types of Lists They are
<ul>
– Unordered List -> This will list items using plain bullets without
specific order
<ol>
– Ordered List -> This will list items using different types of numbers
using specific sequence
<dl>
– Definition List -> This arrange the
information just like Dictionary.
HTML Unordered List:
Use bullet
points (usually discs or circles) to list items without a specific order.
Syntax:
ul>
<li>Item1</li>
<li>Item1</li>
<li>Item1</li>
</ul>
Example:
<ul>
<li>Apple</li>
<li>Mango</li>
<li>Grapes</li>
</ul>
Output:
HTML Ordered List:
Use numbers
or letters to list items in a specific sequence.
Syntax:
<ol>
<li>Apple</li>
<li>Mango</li>
<li>Grapes</li>
</ol>
Example:
HTML Definition List:
Define
terms and their descriptions.
Syntax:
<dl>
<dt>Term1</dt>
<dd>Description
1</dd>
<dt>Term2</dt>
<dd>Description
2</dd>
</dl>
Example:
<dl>
<dt>Apple</dt>
<dd>If
you eat Apple daily no need to visit doctor</dd>
<dt>walking</dt>
<dd>if
you go walking daily no need to visit doctor”></dd>
</dl>
Output:
Key Points:
· Each list item is enclosed within <li> tags.
· Lists are essential for organizing content, improving readability, and creating navigation menus.