HTML List

HTML lists are used to specify data sets. All lists can include one or more elements from the list. HTML lists are available in three different types:

  • Ordered List or numbered List (ol)
  • Unordered List or Bulleted List (ul)
  • Description List or Definition List (dl)

Ordered List or numbered List

All list items in the ordered HTML lists are marked with numbers by default. It is also known as a numbered list. The ordered list starts with the < ol > tag and the list item starts with the < li > tag.

Example

Output

HTML Lists

HTML Unordered List or Bulleted List

All the list items are marked with bullets in the HTML Unordered list. It is also referred to as a bulleted list. The Unordered list starts with the < ul > tag. The < li > tag starts with the list item.

Example

Output

HTML Lists

HTML Description List or Definition List

HTML Description list is also a list style that is supported by HTML and XHTML. It is referred as a definition list where the entries are listed as a dictionary or encyclopedia.

The definition list is useful when we want to present a glossary, a list of terms or another name-value list.

The HTML definition list contains three tags:

<dl> tag: Defines the starting of the list.

<dt> tag: Defines a term.

<dd> tag: Defines the term definition(description).

Example

Output

HTML Lists

HTML Nested List

A list within another list is called a nested list. If you want a bullet list inside a numbered list, this type of list will be called a nested list.

Example

Output

HTML Lists

HTML Unordered List or HTML Bulleted List

The HTML Unordered List or Bulleted lists can display bulleted items. We can use an unordered list to display the items in any random order. The HTML ul tag is used in the unordered list.

There may be 4 types of bulleted list:

  • disc
  • circle
  • square
  • none

There are 4 types of attributes in the < ul > tag to represent different ordered lists.

TypeDescription
“disc”It’s the default style. In this style, the items of the list are marked with bullets.
“circle”The items in the list are marked with circles.
“square”The list items in the list are marked with squares.
“none”The list items are not marked here.

Unordered List Example

Output

HTML Lists

ul type=”disc”

Example

Output

HTML Lists

ul type=”circle”

Output

HTML Lists

ul type=”square”

Example

Output

HTML Lists

ul type=”nono”

Example

Output

HTML Lists

HTML Description List | HTML Definition List

HTML Description List or Definition List shows elements like a dictionary in description form. The < dl >, < dt > and < dd > tags are used to define the set of descriptions.

There are three types of description list tags given below:

  • <dl>tag: Defines the list of definitions.
  • <dt>tag: Defines data term.
  • <dd>tag: Defines data definition (description).

Example

Output

HTML Lists

Pin It on Pinterest

Share This