Unordered List
Part of the Fundamentals section of Coddy's HTML journey — lesson 12 of 60.
In HTML, an unordered list is a list of items that are not ordered by numbers or letters. Instead, each item is marked with a bullet point.
To create an unordered list, you use the <ul> tag. Each item in the list is defined using the <li> tag.
Here's how you can create an unordered list in HTML:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>In this example, the <ul> tag defines the unordered list, and each <li> tag represents a list item. When displayed in a browser, this code will create a list with bullet points:
- Item 1
- Item 2
- Item 3
Unordered lists are useful for presenting items where the order doesn't matter, such as a list of ingredients or features.
Challenge
EasyCreate an HTML document with an unordered list that contains three items: "Apple", "Banana", and "Orange". (In that order)
Cheat sheet
To create an unordered list use the <ul> tag with <li> tags for each item:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>Unordered lists display items with bullet points and are useful when order doesn't matter.
Try it yourself
<!DOCTYPE html>
<html>
<body>
<!-- Write code here -->
</body>
</html>This lesson includes a short quiz. Start the lesson to answer it and track your progress.
All lessons in Fundamentals
2Text and Formatting
HeadingsParagraphsLine BreaksBold and Italic TextBold and Italic AgainRecap - Formatting8Forms and Inputs Part 1
Form BasicsText InputsInput AttributesPassword FieldLabels for InputsRecap - Basic Form11Event Registration Page
Project OverviewHeader Section9Forms and Inputs Part 2
Radio ButtonsCheckboxesDropdownsButtonsButtons in FormsRecap - Forms #1Recap - Forms #2