| Viewed 111 times

how to make a list in html


how to make a list in html

1 Answer
Mikdam Qandeel
Answered
3

List in HTML are similar to each other especially that each list of item start with <li> but there is a little different between them and it consists of two types:

1. Ordered List

It starts with <ol> tag.

Example:

<ol>
  <li>Qandeel</li>
  <li>Academy</li>
  <li>Jordan</li>
</ol>

Output:

  1. Qandeel
  2. Academy
  3. Jordan

The most important attribute in this type is the type attribute,  It defines the type of the list item marker.

Example(1):

<ol type="A">
  <li>Qandeel</li>
  <li>Academy</li>
  <li>Jordan</li>
</ol>

Output:

  1. Qandeel
  2. Academy
  3. Jordan

 

Example(2):

<ol type="i">
  <li>Qandeel</li>
  <li>Academy</li>
  <li>Jordan</li>
</ol>

Output:

  1. Qandeel
  2. Academy
  3. Jordan

2. Unordered List

The unordered list starts with the <ul> tag. In this type, we define the style of the list item marker withlist-style-type property and we use it like this: 

Example(1):

<ul style="list-style-type:disc;">
  <li>Qandeel</li>
  <li>Academy</li>
  <li>Jordan</li>
</ul>

Output:

  • Qandeel
  • Academy
  • Jordan

 

Example(2):

<ul style="list-style-type:square;"">
  <li>Qandeel</li>
  <li>Academy</li>
  <li>Jordan</li>
</ul>

Output:

  • Qandeel
  • Academy
  • Jordan