Ordered, Unordered, and Description Lists

Use <ul> for unordered lists, <ol> for ordered lists, and <li> for list items. <dl>, <dt>, and <dd> are useful for terms and their descriptions.

HTML Lists
<ul>\n  <li>HTML</li>\n  <li>CSS</li>\n</ul>\n\n<ol>\n  <li>Install Node.js</li>\n  <li>Create the project</li>\n</ol>\n\n<dl>\n  <dt>HTML</dt>\n  <dd>Structures web content.</dd>\n</dl>
💡 Each list type communicates a different relationship between items.
Key Takeaways
  • Use ul when order does not matter.
  • Use ol when sequence matters.
Knowledge Check

Which element represents an ordered list?