Lists
We can display text in lists, whether numbered or unordered. Numbered lists are created using the ol
element with li
children, where the ol
element represents the start and end of the list, and the li
element(s) represent individual list items.
This code:
<ol>
<li>I am the first item in the list!</li>
<li>I am the second item in the list!</li>
</ol>
Will be displayed as:
- I am the first item in the list!
- I am the second item in the list!
Unordered lists work the same way, just replace ol
with ul
. So this code:
<ul>
<li>I am the first item in the list!</li>
<li>I am the second item in the list!</li>
</ul>
Will be displayed as:
- I am the first item in the list!
- I am the second item in the list!
Instructions
Below the 10th line, create an empty div
element.
Create a second-level heading (h2
) with the text Breeds
as a child of the newly created div
element.
Create an empty unordered list (ul
) as the next child of the newly created div
element. (Below the newly created h2
element)
Create 3 list items (li
) as children of the newly created ul
element with the texts: Persian
, European
, Siamese
Start programming for free
6/8