Learn
HTML list items
HTML lists
Lists in HTML are a powerful way to organize and structure content on a web page. By using the appropriate list type and nesting lists within each other, web developers can create complex and highly structured documents that are easy for users to read and navigate.
There are two types of lists in HTML:
- Ordered list (
<ol>
) - Unordered list (
<ul>
)
Each item in the list is represented by a <li>
tag.
Here's an example:
Instructions
Below our <h3>
with the text Here is our top list:
, let's create an ordered list with 3 empty items.
To create an ordered list, we should use the <span classname='highlighted-code'><ol>
</span> tag.
For example, to create an <span classname='highlighted-code'><ol>
</span> with 2 items, write the following:
<ol>
<li></li>
<li></li>
</ol>
Inside the first list item add a <h4>
title with the text: Greece
.
Below the title (also inside the first list item), let's add a paragraph that says:
Inside the second list item, let's add a <h4>
with the text Italy
and a paragraph below with the text:
And last but not least, inside the third list item, let's add a <h4>
with the text Spain
and a paragraph below with the text:
Sign up to start coding
Already have an account?
Sign In