Code Highlights logo

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:

1<ul>
2 <li>Item 1</li>
3 <li>Item 2</li>
4 <li>Item 3</li>
5</ul>

Instructions

1.

Below our <h3> with the text Here is our top list:, let's create an ordered list with 3 empty items.

2.

Inside the first list item add a <h4> title with the text: Greece.

3.

Below the title (also inside the first list item), let's add a paragraph that says:

1Greece, officially the Hellenic Republic, is a country in Southeast Europe. It is situated on the southern tip of the Balkan Peninsula, and is located at the crossroads of Europe, Asia, and Africa.
4.

Inside the second list item, let's add a <h4> with the text Italy and a paragraph below with the text:

1Italy, officially the Italian Republic or the Republic of Italy, is a country in Southern and Western Europe.
5.

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:

1Spain, or the Kingdom of Spain, is a country primarily located in southwestern Europe with parts of territory in the Atlantic Ocean and across the Mediterranean Sea.

Sign up to start coding

Already have an account?

Sign In

Course content