![]() |
VOOZH | about |
An HTML list organizes content into ordered or unordered formats, making information clear and easy to read.
Syntax:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
Output:
HTML (HyperText Markup Language) uses tags to define and structure elements on a webpage. Each tag tells the browser how to display the content - such as text, images, links, or layouts.
There are three main types of lists in HTML
Unordered lists display items as bulleted points where the order of items does not matter, using the <ul> and <li> tags.
Attribute: This tag contains two attributes which are listed below:
Output:
Ordered lists are used when the items need to follow a specific sequence.
In an ordered list, all list items are marked with numbers by default. An ordered list starts with the <ol> tag, and each list item begins with the <li> tag.
Attributes:
Syntax:
<ol>
<li>Item1</li>
<li>Item2</li>
<li>Item3</li>
</ol>
Output:
A description list is a list of terms, with a description of each term. Description lists are less common but very useful for definitions, glossaries, or any other key-value pairs of items.
Syntax:
<dl>
<dt>Item 1</dt>
<dd>Description of Item 1 </dd>
<dt>Item 2</dt>
<dd>Description of Item 2</dd>
</dl>