Publish in HTML Tutorial el 24/05/2025 16:33
The <li> (List Item) element is used to represent an item in a list. It must be contained within a parent element: either an <ol> (ordered list), <ul> (unordered list), or <menu> (menu list). The <li> element is fundamental for creating structured content in HTML documents.
Here's how the basic syntax of an <li> element looks:
When rendered, this will appear as:
The <li> element supports several attributes:
A simple unordered list with default bullet points:
An ordered list where we manually set the numbering using the value attribute:
Lists can be nested inside other list items to create hierarchical structures:
Creating a list dynamically using JavaScript:
A list with interactive items that respond to clicks:
list-style-type: none
in CSSThe <li> element is supported by all browsers and has been part of HTML since the earliest versions.
The <style> HTML element contains style information for a document, or part of a document. ...
The <strong> element is used to indicate that its content has strong importance, seriousnes...
The <span> element is an inline container used to mark up a part of a text or document. Unl...
The <source> element is used to specify multiple media resources for media elements like &l...
The <small> element is used to represent side-comments and small print, typically for discl...
HTML <section> Element: The Complete Guide The <section> element is a semantic HTML ...