Html 5 - Lists


Html 5 - Lists

Lists are used to record relevant information or display data or information on a web page in an ordered or unordered manner. For example, you need to create an order or no order list to buy an item, making it easier to organize your data and find things. See the HTML.

The different types of attributes you can use with ordered and unordered lists.

  • Ordered List
  • Unordered List
  • Description Lists

Unordered List (UL)

The unordered list starts with the "ul" tag. Each list entry begins with a "li" tag. List items are bulleted by default. H. A small black circle.

  • Attributes: This tag contains two attributes: Compact: The list becomes smaller.
  • Type: Indicates the Type of marker used in the list.
  • Note: HTML5 does not support the attribute.

    1. List item markers are different for unordered HTML lists.
    2. You can use a disk to setlist item markers to bullets. H. Default.
    3. You can use a circle to place a list item marker on a circle.
    4. You can use a square to place a list item marker on a square.
    5. Nothing can be used to set a list item marker without a marker.

Nested Unordered List

This is used to nest list items. That is, list them in a separate list.

HTML Ordered List (OL)

The ordered list starts with the "ol" tag. Each list entry begins with a "li" tag. By default, list items are numbered.

Attribute:

Compact: Specifies that the list needs to be compressed (HTML5 does not support compact attributes, use CSS instead).

Reverse: Defines the order to be descending.

Start: Defines the number or alphabet at which the order starts.

Type: Defines the Type of order (1, A, a, I, and i), number, alphabet, or Roman numeral to include in the list. The HTML ordered list has several list item markers, and the tag's type attribute defines the Type of the list item marker.

List items are numbered by default.

  • Type = "A"; this list is numbered in uppercase.
  • If Type = "a", these list items are numbered in lowercase.
  • Type = "I"; these list items are numbered in Roman letters.
  • Type = "i"; these list items are numbered with small Roman numerals.
  • Type = "i"; these list items are numbered with small Roman numerals.

HTML Description List

A description list is a list of terms containing each term's description. The tag defines a description list, the tag represents a term name, and the tag describes each term.