Class – 10 | HTML Lists | HTML Tutorial

HTML Lists - Class - 10
HTML Lists – Class – 10

HTML provides several lists that can be used to structure and organize content on a web page. The most commonly used lists in HTML are:

  1. Unordered lists (UL) – Bullet points represent these lists; the tag denotes the list items. The tag surrounds the whole list.

Example:

<ul>
  <li>item 1</li>
  <li>item 2</li>
  <li>item 3</li>
</ul>

2. Ordered lists (OL) – Numbers represent these lists, and the tag denotes the list items. The tag surrounds the whole list.

Example:

<ol>
  <li>item 1</li>
  <li>item 2</li>
  <li>item 3</li>
</ol>

3. Definition lists (DL) – These lists define terms and their corresponding definitions. The terms and definitions are denoted by the <dd> tag. The tag surrounds the whole list.

Example:

<dl>
  <dt>Term 1</dt>
  <dd>Definition 1</dd>
  <dt>Term 2</dt>
  <dd>Definition 2</dd>
  <dt>Term 3</dt>
  <dd>Definition 3</dd>
</dl>

In addition to these lists, other lists can be created using CSS, such as custom bullet styles and indentations. However, these essential lists are enough to handle most of the needs of a website.

Next Class

Leave a Comment

Your email address will not be published. Required fields are marked *