Hello, young web designer! In this tutorial, we're going to learn about HTML lists and how to use them to organize information on your web pages. Lists are a great way to present information in an easy-to-read format. There are two main types of lists: ordered lists and unordered lists. Let's get started!
<ol>
(ordered list) element and the <li>
(list item) element for each item in the list.Here's an example of an ordered list:
html<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
<ul>
(unordered list) element and the <li>
(list item) element for each item in the list.Here's an example of an unordered list:
html<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
Step 1: Open the HTML file you created in the previous tutorial or create a new one.
Step 2: Create an ordered list with at least three items. For example:
html<ol>
<li>Wake up</li>
<li>Brush teeth</li>
<li>Have breakfast</li>
</ol>
Step 3: Create an unordered list with at least three items. For example:
html<ul>
<li>Apples</li>
<li>Bananas</li>
<li>Cherries</li>
</ul>
Step 4: Save your file and open it in a web browser to see your lists displayed on your web page!
Understanding and using HTML lists is an important skill for organizing information on your web pages. Keep practicing, and soon you'll be able to create beautiful and functional lists like a pro!