HTML provides different types of lists to organize and display content effectively.
Unordered List
An unordered list is used to group related items without a specific order. It is represented using the <ul> tag.
Example:
- Item 1
- Item 2
- Item 3
Ordered List
An ordered list is used for items that need to be in a specific sequence. It is represented using the <ol> tag.
Example:
- laptop
- shoes
- heals
- mobile
Types of Attribute
1)type attribute
2)start attribute
3)reversed attribute
Ordered List Attributes
1) type attribute: Specifies the numbering type (1, A, a, I, i).
Example:
- First
- Second
- Third
2) start attribute: Defines the starting number for the list.
Example:
- Step 5
- Step 6
- Step 7
3) reversed attribute: Displays the list in descending order.
Example:
- Last Step
- Middle Step
- First Step
Description List
A description list is used for terms and their descriptions. It is represented using the <dl> tag.
Example:
- HTML
- HyperText Markup Language
- CSS
- Cascading Style Sheets
Description List
A description list is used for terms and their descriptions. It is represented using the <dl> tag.
Example:
- HTML
- HyperText Markup Language
- CSS
- Cascading Style Sheets
Definition List
A definition list is similar to a description list and is used to provide definitions for terms.
Example:
- JavaScript
- A programming language used for web development.
- Python
- A powerful high-level programming language.
Dictionary List
A dictionary list is another term for a definition list where terms are paired with descriptions.
Example:
- HTTP
- HyperText Transfer Protocol, used for communication on the web.
- URL
- Uniform Resource Locator, the address of a webpage.