如何在HTML中创建一个有序列表,其中列表项使用大写罗马数字编号?
有序列表是一组带有编号的项目。它使您能够在上下文中控制序列号。允许我们将一组相关的项目分组在列表中。
HTML support ordered list, unordered list and we have to use the c34106e0b4e09414b63b2ea253ff83d6 tag, to create ordered list in HTML. The c34106e0b4e09414b63b2ea253ff83d6 tag defines the ordered list. We use 25edfb22a4f469ecb59f1190150159c6 tag to start list of items. The list of items can be marked as numbers, lowercase letters uppercase letters, roman letters, etc.
默认顺序是在上下文中对列表项进行编号。
The 25edfb22a4f469ecb59f1190150159c6 tag should be placed inside the c34106e0b4e09414b63b2ea253ff83d6 tag to create the list of items.
We use type attribute of the c34106e0b4e09414b63b2ea253ff83d6 tag, for creating an ordered list with numbers.
We can also use 0618e51276bed239bece67fda16b1b87 to create ordered list numbered with uppercase roman numbers.
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>
Example 1
给出以下是一个在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>
以下是上述示例程序的输出。
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>
在实施上述HTML代码后,输出结果如下 -
以上就是如何在HTML中创建一个有序列表,其中列表项使用大写罗马数字编号?的详细内容,更多请关注双恒网络其它相关文章!