In HTML, you can create different types of lists to organize content. The most common types are ordered lists, unordered lists, and definition lists.
1. Unordered List ( <ul> ) An unordered list displays items with bullet points.
Example
<ul >
<li >Item 1</li >
<li >Item 2</li >
<li >Item 3</li >
</ ul >
show = true, 3000)" class="absolute top-[10px] right-[10px] inline-flex items-center justify-center gap-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-smooth h-9 rounded-md px-3 cursor-pointer bg-white/80 border border-border">
Try it yourself
2. Ordered List ( <ol> ) An ordered list displays items with numbers.
Example
<ol >
<li >First item</li >
<li >Second item</li >
<li >Third item</li >
</ ol >
show = true, 3000)" class="absolute top-[10px] right-[10px] inline-flex items-center justify-center gap-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-smooth h-9 rounded-md px-3 cursor-pointer bg-white/80 border border-border">
Try it yourself
3. Definition List ( <dl> ) A definition list is used to define terms and their descriptions.
Example
<dl >
<dt >Term 1</dt >
<dd >Description of Term 1.</dd >
<dt >Term 2</dt >
<dd >Description of Term 2.</dd >
</ dl >
show = true, 3000)" class="absolute top-[10px] right-[10px] inline-flex items-center justify-center gap-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-smooth h-9 rounded-md px-3 cursor-pointer bg-white/80 border border-border">
Try it yourself
Styling Lists Lists can be styled using CSS to change bullet styles, number types, indentation, and more.
Example
<ul style="list-style-type: square;" >
<li >Item 1</li >
<li >Item 2</li >
</ ul >
show = true, 3000)" class="absolute top-[10px] right-[10px] inline-flex items-center justify-center gap-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground transition-smooth h-9 rounded-md px-3 cursor-pointer bg-white/80 border border-border">
Try it yourself