Class – 10 | HTML Lists | HTML Tutorial

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

HTML provides several types of 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) – These lists are represented by bullet points, and the list items are denoted by the <li> tag. The whole list is surrounded by the <ul> tag.

Example:

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

2. Ordered lists (OL) – These lists are represented by numbers, and the list items are denoted by the <li> tag. The whole list is surrounded by the <ol> tag.

Example:

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

3. Definition lists (DL) – These lists are used to define terms and their corresponding definitions. The terms are denoted by the <dt> tag, and the definitions are denoted by the <dd> tag. The whole list is surrounded by the <dl> tag.

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, there are other lists that can be created using CSS such as custom bullet styles and indentations, etc. However, these basic lists are enough to handle most of the needs of a website.

Next Class

Leave a Comment