Example for unordered list |HTML|

Introduction

    In HTML, an unordered list is a way to present a list of items in a bulleted format, where the order of the items is not significant. It's denoted by the <ul> (unordered list) tag. Each item within the list is represented by the <li> (list item) tag.


Code

    
     
    <html>
    <head>
        <title>Exploring Unordered Lists</title>
    </head>
    <body>
        <h2>Fruits</h2>
        <ul>
        <li>Apple</li>
        <li>Orange</li>
        <li>Banana</li>
        <li>Grapes</li>
        </ul>
    </body>
    </html>
        
       
     


Output


In this example 
1. The <ul> tag defines the start of the unordered list.
2. Each <li> tag represents an item within the list.
3. The content inside each <li> tag is the text of the item.

    When rendered in a web browser, this HTML code will display the list of fruits with bullet points before each item, indicating that it's an unordered list. The order of the fruits doesn't matter; they're simply listed in the order they appear in the HTML code.

Conclusion

     Unordered lists are commonly used for menus, navigation bars, or any other list of items where the specific order is not important. They provide a clear and visually appealing way to present information on a webpage.

Post a Comment

0 Comments