Write a program to demonstrate the HTML Ordered and Unordered Lists.

1
2
3
    <html>
4
    <head>
5
        <title>
6
            List Demo </title>
7
    </head>
8
    <body>
9
        <ol type=A>
10
            <LI> MS-WORD </LI>
11
            <LI> MS-POWERPOINT</LI>
12
            <LI> MS-EXCEL</LI>
13
            <LI> MS-ACCESS</LI>
14
        </OL><BR><BR>
15
        <OL TYPE=1 START=5>
16
            <LI> MS-WORD</LI>
17
            <LI> MS-POWERPOINT</LI>
18
            <LI> MS-EXCEL</LI>
19
            <LI> MS-ACCESS</LI>
20
        </OL><BR><BR>
21
        <uL TYPE=square>
22
            <LI> MS-WORD</LI>
23
            <LI> MS-POWERPOINT</LI>
24
            <LI> MS-EXCEL</LI>
25
            <LI> MS-ACCESS</LI>
26
        </ul><BR><BR>
27
    </body>
28
    </html>
29
    

Output

1
2
        No Output Available
3
        

Rate the Code

Reviews are published after a quick safety check (usually within 24 hours).

Reviews are public. Developers can see basic device specifications to respond. Learn more

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.
License: This program's source code is open-sourced under the MIT License, while the rest of the program's text content and overall dhimanp platform and brand content remain proprietary under dhimanp.

Submit your modified code

Your submissions are published after a quick safety check (usually within 7 days).

Submissions are public. Developers can see basic device specifications to respond. Learn more

Disclaimer

The information that you shared with us will be publicly visible, and everyone can see your information. And we (dhimanp) are not responsible if anyone misuses this information. We can remove any submitted code at any time for better transparency.

Privacy Policy

If you share your data with us by submitting your code for credit, then we may show your full name, school or college name, and city name on our website.

We are not using this data to track you and are not selling this data to anyone.

If you want to remove your name from our website, you can contact us, and we will remove your name from our website. In the removal process, full credit, including your full name, school or college, city, and code, will be removed from our website.