HTML tag ol
- 24-07-2022
- Trung Minh
- 0 Comments
In this lesson freetuts will show you how to use the ol tag in HTML, which is a list tag with number format.
The ol tag will define an ordered list, which will be numbered or alphabetical.
Use the li tag to identify the items in the list.
How to use ol tag in HTML
For example , use the ol tag and the li tag to create a list of courses.
<!DOCTYPE html> <html> <head> <title>Học lập trình miễn phí tại web888.vn</title> <meta charset="utf-8"> </head> <body> <h1>Học lập trình miễn phí tại web888.vn</h1> <ol> <li>PHP</li> <li>Javascript</li> <li>Css</li> <li>HTML</li> </ol> </body> </html>
Attributes of the HTML ol tag
This card has 3 basic tnihs properties as follows:
- reversed – the list will be sorted from high to low.
- start – the starting numeric value of the list.
- type – specifies the type of markup character to use in the list.
Example : Use the type attribute of the ol tag to create a list of courses marked with a capital letter.
<!DOCTYPE html> <html> <head> <title>Học lập trình miễn phí tại web888.vn</title> <meta charset="utf-8"> </head> <body> <h1>Học lập trình miễn phí tại web888.vn</h1> <ol type="A"> <li>PHP</li> <li>Javascript</li> <li>Css</li> <li>HTML</li> </ol> </body> </html>