DEV Community


Posted on

Html lists

HTML lists are used to group together related pieces of information. All lists may contain one or more list elements. There are three different types of HTML lists:

  1. - Unordered List - bulleted List <ul>
  2. - Ordered List - numbered List <ol>
  3. - Description List - definition List <dl>

HTML Unordered Lists - An unordered list is a collection of related items that have no special order. The Unordered list starts with <ul> tag and list items start with the<li> tag. Each item in the list is marked with a bullet.

Enter fullscreen mode Exit fullscreen mode

HTML Ordered Lists - In the ordered HTML lists, all the list items are marked with numbers by default. It is known as numbered list also. The ordered list starts with <ol> tag. The numbering starts at one and is incremented by one for each list element tagged with <li>.

Enter fullscreen mode Exit fullscreen mode

The type attribute for <ol> tag is used to specify the type of numbering you want to use:

<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.

HTML Description Lists - A description list is a list of terms, with a description of each term.

<dl> - defines a description list
<dt> - defines a term in a description list
<dd> - describes the term in a description list


  <dd>- world's best boss</dd>
  <dd>- the office receptionist</dd>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)