How to create an ordered list in HTML where the list items are numbered using uppercase Roman numerals?

王林
Release: 2023-09-03 12:09:04
forward
1434 people have browsed it

An ordered list is a set of numbered items. It enables you to control serial numbers contextually. Allows us to group a set of related items in a list.

HTML support ordered list, unordered list and we have to use the

    tag, to create ordered list in HTML. The
      tag defines the ordered list. We use
    1. tag to start list of items. The list of items can be marked as numbers, lowercase letters uppercase letters, roman letters, etc.

      The default order is to number the list items within the context.

      • The

      • tag should be placed inside the
          tag to create the list of items.

        1. We use type attribute of the

            tag, for creating an ordered list with numbers.

          1. We can also use

              to create ordered list numbered with uppercase roman numbers.

              How to create an ordered list in HTML where the list items are numbered using uppercase Roman numerals?

            Syntax

            Following is the syntax to create an ordered list items numbered with uppercase roman numbers in HTML.

            <ol type="A">
               <li>Item in list…</li>
               <li>Item in list…</li>
               <li>Item in list…</li>
            </ol>
            
            Copy after login

            Example 1

            Given below is an example of creating an ordered list of items numbered using uppercase Roman numerals in HTML.

            <!DOCTYPE html>
            <html>
            <head>
               <meta charset="UTF-8">
               <meta http-equiv="X-UA-Compatible" content="IE=edge">
               <meta name="viewport" content="width=device-width, initial-scale=1.0">
            </head>
            <body>
               <ol type="I">
                  <li>Abdul</li>
                  <li>Jason</li>
                  <li>Yadav</li>
                  <li>Lokesh</li>
               </ol>
            </body>
            </html>
            
            Copy after login

            The following is the output of the above example program.

            Example 2

            Let us look at another example to create an ordered list with uppercase roman numbers as bullets −

            <!DOCTYPE html>
            <html>
            <head>
               <title>World Cup Teams</title>
            </head>
            <body>
               <h1>List of teams for World Cup</h1>
               <ol type = "I">
                  <li>India</li>
                  <li>Australia</li>
                  <li>South Africa</li>
                  <li>New Zealand</li>
                  <li>Pakistan</li>
                  <li>Srilanka</li>
                  <li>West Indies</li>
                  <li>Bangladesh</li>
               </ol>
            </body>
            </html>
            
            Copy after login

            After implementing the above HTML code, the output results are as follows -

            The above is the detailed content of How to create an ordered list in HTML where the list items are numbered using uppercase Roman numerals?. For more information, please follow other related articles on the PHP Chinese website!

          2. source:tutorialspoint.com
            Statement of this Website
            The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
            Popular Tutorials
            More>
            Latest Downloads
            More>
            Web Effects
            Website Source Code
            Website Materials
            Front End Template