HTML LISTS
HTML Lists: Organizing Information
What are HTML Lists?
HTML lists are used to group and organize content into items. There are two main types of lists:
- Ordered Lists: Display items in a specific order, using numbers or letters. Created with the <ol> tag.
- Unordered Lists: Display items without a specific order, using bullet points. Created with the <ul> tag.
Creating Ordered Lists
To create an ordered list, use the <ol> tag. Each item in the list is enclosed in an <li> tag.
                <ol>
                <li>First item</li>
                <li>Second item</li>
                <li>Third item</li>
                </ol>
            
        Creating Unordered Lists
To create an unordered list, use the <ul> tag. Each item in the list is enclosed in an <li> tag.
                <ul>
                <li>First item</li>
                <li>Second item</li>
                <li>Third item</li>
                </ul>
            
        Example: HTML Lists
Here’s an example of an ordered and an unordered list:
                <!DOCTYPE html>
                <html lang="en">
                <head>
                <meta charset="UTF-8">
                <title>HTML Lists Example</title>
                </head>
                <body>
                <h2>Ordered List</h2>
                <ol>
                <li>Item 1</li>
                <li>Item 2</li>
                <li>Item 3</li>
                </ol>
                <h2>Unordered List</h2>
                <ul>
                <li>Item A</li>
                <li>Item B</li>
                <li>Item C</li>
                </ul>
                </body>
                </html>
            
         
No comments