The <li> tag is used to define the item of list. In supports both order and unordered list item. The <ol> tag is used for order list and the <ul> tag is used for unordered list. It mostly used between ordered list tag or unordered list tag. The value attribute can support only for ordered list .
Attributes of form:| Attribute | Value | Description |
| value | number, character etc li | specify the value of list first item. |
|
|
|
<!DOCTYPE html> <html > <head> <title>List of items </title> </head><body> <h2>Example of <li> list item tag of HTML5.</h2> <strong>Unordered list</strong><ul> <li>C</li> <li>c++</li> <li>JAVA</li> </ul> <strong>Ordered list:</strong><ol> <li>Bharat Singh</li> <li>Ankit kumar</li> <li>Vinay </li> </ol> <strong>Ordered list with specified value:</strong> <ol > <li value="10">Bharat Singh</li> <li>Ankit kumar</li> <li>Vinay </li> </ol></body> </html> |
No difference.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.