HTML CSS examples for HTML Tag:li
The li element marks an item in a list.
You can use it with the ul, ol, and menu elements.
The li Element summary
Item | Value |
---|---|
Element | li |
Element Type | N/A |
Permitted Parents | ul, ol, menu |
Local Attributes | value (only permitted when child of ol element) |
Contents | Flow content |
Tag Style | Start and end tag |
New in HTML5 | No |
Changes in HTML5 | The value attribute deprecated in HTML4 has been restored in HTML5 |
Style Convention
li {
display: list-item;
}
Using the li Element
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> I like: <!--from w w w . j a va 2 s . co m--> <ul> <li>CSS</li> <li>HTML</li> <li>Code</li> <li>Java</li> <li>SQL</li> <li>C</li> </ul> </body> </html>