Core Concept of HTML Ordered and Unordered Lists
To make two list with the help of HTML are ordered list <ol> and unordered list <ul>.
- Ordered list <ol>: When we need to show the list items in a sequence like 1,2,3 or A, B, C, etc. You can also change the start value by adding start=value, like 4, 10, or anything else, as an attribute in the <ol> tag.
- Unordered list <ul>: When to show the list without order. The items are shown by default as bullet points. You can change the type to square or remove any style too. You are reading this content with an unordered list, and this is the best example of an unordered list.
Why is it used?
To add or show step-by-step instructions, navigation links, a features list, or a menu with well-structured formatting.
Real-life Applications
- Navigation Menus: To make the link list into the header and footer, the <ul> is used.
- Step-by-step instructions: To show the steps for a tutorial like a recipe or installation guide, the <ol> is used.
- Product Features: To show the product key specifications like battery, camera, processor, or anything else) the built-in <ul> list is used.
Key Benefits of this Program
- Accessibility (Screen Reader): By adding the list, the text-to-speech feature reads the list items.
- Automatic Numbering: If any item is added or removed at any position, then the numbering for the items is auto-managed.
