In HTML, lists are a great way to organize information in a clear and structured manner. There are two main types of lists you can create: ordered lists, which are used for instructions in a recipe, and unordered lists, which are used for listing ingredients in a recipe.
An ordered list in HTML is a fancy way to say a numbered list. To create an ordered list, use the <ol> tag. To create the list items, inside the <ol> tag, use <li> tag. Here's an example:
This code yields the following result:
An unordered list in HTML is a fancy way to say a bulleted list. To create an unordered list, use the <ul> tag. Once again, to create the list items, inside the <ul> tag, use <li> tag. Here's an example:
This code yields the following result:
Images created by Ethan Cheng, accessed from Codehs.com.