29.0k views
3 votes
Write a html5 code to display 5 friends both an orderd and unordered list .

User Omerkudat
by
5.2k points

1 Answer

3 votes

Answer:

See Explanation

Step-by-step explanation:

Ordered List

The ordered list is defined with the tag <ol> ..... </ol>

Each list are enclosed in <li> ... </li>

Take for instance the name of the 5 friends are Friend 1 to Friend 5, the code to display an ordered list is as follows:

<ol>

<li>Friend 1</li>

<li>Friend 2</li>

<li>Friend 3</li>

<li>Friend 4</li>

<li>Friend 5</li>

</ol>

By default, the ordered list displays numeric number (1,2,3...) as its order; So, the above code will display

1. Friend 1

2. Friend 2

3. Friend 3

4. Friend 4

5. Friend 5

To change the order format to numerals (for instance), you start the tag with <ol type = "i">

Unordered list

The ordered list is defined with the tag <ul> ..... </ul>

Each list are enclosed in <li> ... </li>

<ul>

<li>Friend 1</li>

<li>Friend 2</li>

<li>Friend 3</li>

<li>Friend 4</li>

<li>Friend 5</li>

</ul>

The default of an unordered list is the circle

User Numeron
by
5.2k points