Learning Code

Lists

Lists are used to list information and also are frequently used to provide the basic menu structure.

Ordered Lists

Ordered lists use alpha/numerical markers to display list items in a clearly marked order

<body>
   <ol>
      <li> List item 1 </li>
      <li> List item 2 </li>
      <li> List item 3 </li>
   </ol>
</body>
  1. List item 1
  2. List item 2
  3. List item 3


Unordered Lists

Unordered lists use geometric markers to display list items where the precise order is less important

<body>
   <ul>
      <li> List item 1 </li>
      <li> List item 2 </li>
      <li> List item 3 </li>
   </ul>
</body>
  • List item 1
  • List item 2
  • List item 3

Can you use the Try-it Editor to try out these concepts?