HTML Lists

HTML provides different types of lists to organize and display content effectively.

Unordered List

An unordered list is used to group related items without a specific order. It is represented using the <ul> tag.

  • Unordered list is used to display list item in a bullet point format (unordered ways)
  • To create a unordered list we have < ul > tag (It is container tag.)
  • Here we can represent sequence as this circle ,square.
  • To represent list item we have < li > tag (it is a container tag.)
  • Example:

    Ordered List

    An ordered list is used for items that need to be in a specific sequence. It is represented using the <ol> tag.

  • Ordered list is use to create display list item in a sequence order.
  • It is container tag.
  • Here we can represent sequence as alphabatic ,roman number
  • Example:

    1. laptop
    2. shoes
    3. heals
    4. mobile

    Types of Attribute

    1)type attribute

    2)start attribute

    3)reversed attribute

    Ordered List Attributes

    1) type attribute: Specifies the numbering type (1, A, a, I, i).

    Example:

    1. First
    2. Second
    3. Third

    2) start attribute: Defines the starting number for the list.

    Example:

    1. Step 5
    2. Step 6
    3. Step 7

    3) reversed attribute: Displays the list in descending order.

    Example:

    1. Last Step
    2. Middle Step
    3. First Step

    Description List

    A description list is used for terms and their descriptions. It is represented using the <dl> tag.

    Example:

    HTML
    HyperText Markup Language
    CSS
    Cascading Style Sheets

    Description List

    A description list is used for terms and their descriptions. It is represented using the <dl> tag.

    Example:

    HTML
    HyperText Markup Language
    CSS
    Cascading Style Sheets

    Definition List

    A definition list is similar to a description list and is used to provide definitions for terms.

    Example:

    JavaScript
    A programming language used for web development.
    Python
    A powerful high-level programming language.

    Dictionary List

    A dictionary list is another term for a definition list where terms are paired with descriptions.

    Example:

    HTTP
    HyperText Transfer Protocol, used for communication on the web.
    URL
    Uniform Resource Locator, the address of a webpage.