LISTS

HTML Lists :
HTML List is used to group a set of related items.
Types of lists :
  • Unordered List or Bulleted List (ul)
  • Ordered List or Numbered List (ol)
  • Description List or Definition List (dl)
i) Unordered List or Bulleted List (ul) :
It is used to create a list of related items, in no particular order. An unordered list created using the < ul > element, and each list item starts with the < li > element. The list items in unordered lists are marked with bullets by default. So it is also called as Bulleted List.
Type Attribute :
We can use type attribute for < ul > tag to specify the type of bullet we need. By default, it is a disc.
Example:
  • < ul type = "square">
  • < ul type = "disc">
  • < ul type = "circle">

  • ii) Ordered List or Numbered List (ol) :
    It is used to create a list of related items, in a specific order. An ordered list created using the < ol > element, and each list item starts with the < li > element. Ordered lists are used when the order of the list's items is important. The list items in an ordered list are marked with numbers by default. So they are also called as Numbered List.
    Type Attribute :
    We can use type attribute for < ol > tag to specify the type of numbering we need. By default, it is a number.
    Example:
  • < ol type = "1"> - Default-Case Numerals.
  • < ol type ="I"> - Upper-Case Numerals.
  • < ol type = "i"> - Lower-Case Numerals.
  • < ol type = "A"> - Upper-Case Letters.
  • < ol type = "a"> - Lower-Case Letters.

  • Start Attribute :
    We can use start attribute for < ol > tag to specify the starting point of numbering we need.
    Example:
  • < ol type = "1" start = "4"> - Numerals starts with 4.
  • < ol type = "I" start = "4"> - Numerals starts with IV.
  • < ol type = "i" start = "4"> - Numerals starts with iv.
  • < ol type = "a" start = "4"> - Letters starts with d.
  • < ol type = "A" start = "4"> - Letters starts with D.

  • Description List :
    A description list is a list of items with a description or definition of each item. And it is also called as a Definition List. The
    < dl > tag defines the description list, the < dt > tag defines the term (name), and the < dd > tag describes each term. In Simple, the HTML definition list contains following three tags:
  • < dl > - It defines the start of the list.
  • < dt > - It defines a term.
  • < dd > - It defines the term definition (description).
  • Note: Browsers usually render the definition lists by placing the terms and definitions in separate lines, where the term's definitions are slightly indented.


    (WebTech - Table)