HTML Tutorials


Lists

It’s not uncommon to have a collection of items that you may want to put into a list, for which you can use the list tag! Lists come in two flavors: unordered and ordered. Unordered lists use bullet points, while ordered lists use numbers.



Code

<!DOCTYPE html>
<html>

  <body>
    <h2>Cool Jobs:</h2>
    <ul>
      <li>Astronaut</li>
      <li>Teacher</li>
      <li>Programmer</li>
    </ul>

    <h2>My favorite ice cream flavors</h2>
    <ol>
      <li>Walnut</li>
      <li>Buckeye</li>
      <li>Pomegranate</li>
    </ol>
  </body>
</html>

Result

Cool Jobs:

  • Astronaut
  • Teacher
  • Programmer

My favorite ice cream flavors:

  1. Walnut
  2. Buckeye
  3. Pomegranate