how to make a list in html
how to make a list in html
1 Answer
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:
- Qandeel
- Academy
- 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:
- Qandeel
- Academy
- Jordan
Example(2):
<ol type="i">
<li>Qandeel</li>
<li>Academy</li>
<li>Jordan</li>
</ol>
Output:
- Qandeel
- Academy
- 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
answer Link