HTML Basics

HTML Lists

Lists group related items together. HTML offers three types: unordered (bullets), ordered (numbers), and description lists (term and definition pairs).


Unordered Lists

An unordered list uses <ul> and shows a bullet before each <li> item. Use it when the order does not matter.

Unordered list
<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>

Ordered Lists

An ordered list uses <ol> and numbers each item. Use it when sequence matters, such as steps in a recipe.

Ordered list
<ol>
  <li>Write the HTML</li>
  <li>Add some CSS</li>
  <li>Test in the browser</li>
</ol>

Description Lists

A description list pairs terms with their definitions using <dl>, <dt> (term), and <dd> (description).

Description list
<dl>
  <dt>HTML</dt>
  <dd>The markup language for web pages.</dd>
  <dt>CSS</dt>
  <dd>The language used to style pages.</dd>
</dl>
💡

Lists can be nested. Place a full <ul> or <ol> inside an <li> to create sub-items, and the browser will indent them automatically.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships