How Many List Tag in HTML?

Started by bijutoha, 12-02-2014, 21:27:49

Previous topic - Next topic

bijutohaTopic starter

Hello I'm new in this field. I heard about 3 common list tag in HTML . Could anyone tell me in details, Is it right or wrong?
Web to SEO & Photo editing enthusiast.
  •  


uditsh

Common list tag in HTML:
<li> tag defines 'list item'
1. <ul> tag defines 'unordered list'
2. <ol> tag defines 'ordered list'
3. <dl> tag defines 'description list' - <dt> tag defines the 'term in a description list'   And   <dd> tag defines the 'description in a description list'
  •  


ronybarne

#2
Yes, you are correct. In HTML, there are three common list tags: <ul>, <ol>, and <dl>.

1. The <ul> tag is used to create an unordered list, which presents a list of items in no particular order. Each item is represented by a <li> (list item) tag.

2. The <ol> tag is used to create an ordered list, which presents a list of items in a specific order. Each item is also represented by an <li> tag, but the numbering or ordering is automatically applied by the browser.

3. The <dl> tag is used to create a description list, which presents a list of terms and their corresponding descriptions. Each term is represented by a <dt> (data term) tag, and each description is represented by a <dd> (data definition) tag.

These list tags are essential for structuring and formatting content in HTML documents, allowing you to display information in a clear and organized manner.

Here is some additional information about the list tags in HTML:

1. Unordered List (<ul>): The <ul> tag is used to create an unordered list. By default, the list items will be displayed with bullet points. You can customize the appearance of the bullets using CSS. Here's an example of how to use the <ul> tag:

```
<ul>
  <li>Item 1</li>
  <li>Item 2</li>
  <li>Item 3</li>
</ul>
```

2. Ordered List (<ol>): The <ol> tag is used to create an ordered list. The numbering or ordering of the list items is automatically applied by the browser. By default, the list items will be displayed with numbers (1, 2, 3, etc.), but you can also customize the appearance using CSS. Here's an example of how to use the <ol> tag:

```
<ol>
  <li>First item</li>
  <li>Second item</li>
  <li>Third item</li>
</ol>
```

3. Description List (<dl>): The <dl> tag is used to create a description list. It consists of a set of terms and their corresponding descriptions. Each term is represented by a <dt> tag, and each description is represented by a <dd> tag. Here's an example of how to use the <dl> tag:

```
<dl>
  <dt>Term 1</dt>
  <dd>Description 1</dd>
 
  <dt>Term 2</dt>
  <dd>Description 2</dd>
 
  <dt>Term 3</dt>
  <dd>Description 3</dd>
</dl>
```

These list tags are flexible and can be nested within each other to create more complex structures. For example, you can have an ordered list inside an unordered list, or vice versa. Remember to close each list item with a closing tag (<li>, </li>) and the list itself with the corresponding closing tag (<ul>, </ul>; <ol>, </ol>; <dl>, </dl>).
  •  

MarcoLeitner

Yes you are right there are three types of list in html:
1.Ordered list:The ordered list starts with <ol>tag. And the list item starts with <li>tag and this list item will be marked with numbers.
<ol><li>1.</i></ol>
2.Unordered List:The Unordered list starts with <ul> tag. And the list item starts with <li> and the list item will be marked with bullets.
3. Description list:It is a list of term with description of each term.The <dl> tags define the description list, <dt>defines the term and <dd> defines the description data.

Shikha Singh

An unordered list starts with the <ul> tag. Each list item starts with the <li> tag.

The list items will be marked with bullets (small black circles):
<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul>

An ordered list starts with the <ol> tag. Each list item starts with the <li> tag.

The list items will be marked with numbers:
<ol>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

The <dl> tag defines the description list, the <dt> tag defines the term (name), and the <dd> tag describes each term:<dl>
  <dt>Coffee</dt>
  <dd>- black hot drink</dd>
  <dt>Milk</dt>
  <dd>- white cold drink</dd>
</dl>


shivaganguly

There are various types of lists named
1) Unordered list
2) Ordered list
3) List items

Example for unordered list is:
<ul>
<li>Unordered information</li>
<li>Ordered information</li>
<li>Definitions</li>
</ul>

Example for ordered list is:
<ol>
<li>Unordered information</li>
<li>Ordered information</li>
<li>Definitions</li>
</ol>

Some more are dt defines description tag and dl defines description list.
newbielink:http://www.livepro.in [nonactive]
  •