In this lesson we will see how, through special tag, it is possible to realize numbered or bulleted text lists.

In this lesson we will see how, through special tags, it is possible to realize numbered or bulleted text lists.
Let's now see, in a brief example, the difference between a bulleted list and a numbered one:
Bulleted list:
• First text
• Second text
• Third text
Numbered list:
1. First text
2. Second text
3. Third text
With this premise, let's see how to create our lists.
The lists are divided into Ordered Lists and Unordered Lists.
Ordered lists are marked by a numbered list, so we can say that the numbered lists I am ordered lists.
On the contrary, the bulleted lists are defined unordered lists.
Ordered lists (Numbered):
To create this type of list, the tag is used ol (Order list) which indicates to the browser that it is an ordered list in addition to the tag there (List item) which represents the paragraph of the list.
Here is the syntax of an ordered list:
-
- First list item
-
- Second list item
-
- Third list item
This way you will see a numbered and sorted list according to your needs.
Unordered Lists (Bullets):
Unlike the previous one, this list is not marked by a defined and orderly numbering, but only by a reference point.
In this case, instead of ol, ul(Unordered lis) is used, always combined with the li tag since, in this case too, we are dealing with a list.
Here is also the syntax to create this list:
-
- First list item
-
- Second list item
-
- Third list item
Notice the list bullet.
If we want to replace the classic dot to define the list with a small circle, we will use the type attribute combined with the type of the point, which in our case becomes a small circle defined with circe.
Here is our bulleted list using a circle:
-
- First list item
-
- Second list item
-
- Third list item
If we then want a small square as punctuation, we use the definition square:
-
- First list item
-
- Second list item
-
- Third list item
Lists will be very useful for defining lists and navigation menus.
Published in HTML
Be the first to comment