HTML Lists are a general-purpose container for collections of things. They come to the three varieties:
Ordered lists are numbered and useful for presenting things like your top 10 favorite songs from 2015 or the steps to bake a cake. Numbered lists are surrounded by the <ol>.....</ol> tags (ol stands for ordered list), and each item within the list is included in the <li>.....</li> (list item) tag. Ordered lists are lists in which each item is numbered or labeled with a counter of some kind (like letters or roman numerals).
Use numbered lists only when the sequence of items on the list is relevant. Ordered lists are good for steps to follow or instructions to the readers, or when you want to rank the items in a list.
Example
<p> Some laptop brands </p>
<ol>
<li> Apple </li>
<li> HP </li>
<li> Lenovo <li>
<li> Dell </li>
<li> Acer <li>
<li> Asus <li>
</ol>
Unordered lists are often referred to as bulleted lists. Instead of being numbered, each element in the list has the same marker. The markup to create an unordered list looks just like an ordered list except that the list is created by using <ul>.....</ul> tags than ol. The elements of the list are placed within <li> tags, just as with ordered lists.
Browsers have standardized on using a solid bullet to mark each item in an unordered list by default. Text browsers usually use an asterisk for these lists. The following input and output example shows an unordered list.
<p> Some mobile brands </p>
<ul>
<li> Apple </li>
<li> Samsung </li>
<li> Asus </li>
<li> Motorola </li>
<li> Xiaomi <li>
</ul>
👉Definition Lists
Definition lists are used for glossaries and other items that pair a label with some kind of description. Definition lists differ slightly from other lists. Each list item in a definition list has two parts: A term and The term's definition. Each part of the glossary list has its own tag: <dt> for the term (definition term), and <dd> for its definition (definition description). <dt> and <dd> usually occur in pairs, although most browsers can be handle single terms or definition. The entire glossary list is indicated by the tags <dl>.....</dl> (definition list).
Example
<dl>
<dt> Computer </dt>
<dd> Computer is an electronic device which can perform any type of computing work and process a large volume of data and information by using predefined instruction set by a human being (user).
</dd>
<dt> HTML </dt>
<dd> HTML is a tag based language. All the tags are predefined. It is used for developing webpages, it is compatible with http.
</dd>
<dt> XML </dt>
<dd> XML is a tag based language like HTML. HTML is used for displaying data whereas XML is used for transferring and storing data.
</dd>
</dl>
Example
<!DOCTYPE html>
<html>
<head>
<title> HTML Lists </title>
</head>
<body>
<p> List of shopping </p>
<ol>
<li> Desktop </li>
<li> Monitor </li>
<li> CPU </li>
<li> Mouse </li>
</ol>
<p> Types of cameras </p>
<ul>
<li> compact </li>
<li> bridge </li>
<li> DSLR </li>
<li> mirrorless </li>
</ul>
</body>
</html>
NOTES.....
Lists are core structural element for presenting content on web pages and can be used for everything from the list of steps in a process to a table of contents to a structured navigation system for a website.