HTML LISTS

a couple of years ago

HTML has three ways for specifying lists of information. Lists may be:

  • <ul> – An unordered list. This will list items using plain bullets.
  • <ol> – An ordered list. This will use different schemes of numbers to list your items.
  • <dl> – A description lists. This is a list of terms, with a description of each term.

HTML Unordered Lists

It is a collection of related items that have no special order or sequence.

It gives the following result:

  • Page
  • Pencil
  • Eraser
  • Sharpner
  • Ruler

The type Attribute

You can specify the type of bullet you like. By default it is a disc. Following are the possible options:

HTML Ordered Lists

If you want to put your items in a numbered list then HTML ordered list will be used. This list is created by using <ol> tag. The numbering starts at one and is incremented by one for each successive ordered list element tagged with <li>.

This will produce following result:

  1. Page
  2. Pencil
  3. Eraser
  4. Sharpener
  5. Ruler

The type Attribute

You can use type attribute for <ol> tag to specify the type of numbering you like. By default it is a number. Following are the possible options:

The start Attribute

You can use start attribute for <ol> tag to specify the starting point of numbering you need. Following are the possible options:

HTML Description Lists

It makes use of following three tags.

  • <dl> – Defines the start of the list
  • <dt> – A term
  • <dd> – Term definition
  • </dl> – Defines the end of the list
This gives the result:

HTML
This stands for Hyper Text Markup Language
HTTP
This stands for Hyper Text Transfer Protocol

Note: Lists can be nested.

PS: For any questions, queries, feedback and comments feel free to write us at support@qatechhub.com and amruta@qatechhub.com

Amruta Somani

About the Author

Amruta Somani

Leave a Comment: