HTML Lists
- HTML lists are used to display related items in an organized manner. HTML provides three types of lists:
- ordered lists
- unordered lists
- description lists.
<ul> - Unordered List
- The
<ul>tag is used to create a list of items that are displayed with bullet points.
Example
<ul>
<li>HTML</li>
<li>CSS</li>
<li>JavaScript</li>
</ul>
<ol> - Ordered List
- The
<ol>tag is used to create a list of items in a specific order. The items are displayed with numbers or letters.
<li> - List Item
- The
<li>tag is used to define an item inside an ordered list or an unordered list.
Example
<ol>
<li>Introduction</li>
<li>Content</li>
<li>Conclusion</li>
</ol>
<dl> - Description List
- The
<dl>tag is used to create a list of terms and their corresponding descriptions.
<dt> - Description Term
- The
<dt>tag is used to define the term or title within a description list.
<dd> - Description Details
The <dd> tag is used to provide a description or explanation of the term defined by the <dt> tag.
Example
<dl>
<dt>HTML</dt>
<dd>HyperText Markup Language</dd>
</dl>
Top comments (0)