#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
4 min read
•Question 27 of 49easy

What are the Different List Types?

Ordered, unordered, and description lists.

What You'll Learn

  • Three types of lists
  • When to use each
  • Nesting lists

List Types

  • <ul> - Unordered (bullets)
  • <ol> - Ordered (numbers)
  • <dl> - Description (term/definition)

Examples

Unordered List

index.htmlHTML
<ul>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
</ul>

Ordered List

index.htmlHTML
<ol>
  <li>Step one</li>
  <li>Step two</li>
  <li>Step three</li>
</ol>

Description List

index.htmlHTML
<dl>
  <dt>HTML</dt>
  <dd>HyperText Markup Language</dd>

  <dt>CSS</dt>
  <dd>Cascading Style Sheets</dd>
</dl>

Nested Lists

index.htmlHTML
<ul>
  <li>Frontend
    <ul>
      <li>HTML</li>
      <li>CSS</li>
    </ul>
  </li>
  <li>Backend
    <ul>
      <li>Node.js</li>
    </ul>
  </li>
</ul>