September 18, 2022

Lists help us when outlining different content. There are two types of lists i.e. the unordered lists and the ordered lists. To get started with lists, lets see the code snippet below (focus on code inside the body element):

See the Pen Lists by bmutebi (@bmutebi) on CodePen.

To create a list, we use the <ul> element for unordered list and <ol> for ordered list. After creating the list, we use the list item element <li> to list all items we need in the list as seen in the code snippet above.

You can move on to play with lists the way you want by creating your own lists.