The li tag is an element tag in the HTML language. It mainly defines list items. The li tag can be used in ordered lists ol and unordered lists ul. Currently, all mainstream browsers support the li tag.
What element is the li tag?
The li tag is an element tag in the HTML language, mainly defining list items , the li tag can be used in ordered lists ol and unordered lists ul. Currently, all major browsers support the li tag. [Recommended tutorial: HTMLTutorial]
Definition and usage
Differences between HTML and XHTML
In HTML 4.01, the "type" and "value" attributes of the li element are deprecated.
In XHTML 1.0 Strict DTD, the "type" and "value" attributes of the li element are not supported.
For example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文网</title> </head> <body> <p>有序列表:</p> <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol> <p>无序列表:</p> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> </body> </html>
The above is the detailed content of What is the label of li?. For more information, please follow other related articles on the PHP Chinese website!