HTML list

List is used to illustrate examples. There are three formats of commonly used lists:
ordered list
, unordered list,
definition list, and definition list.

1. Unordered list

The unordered list is defined by ul, li defines a single list item, a single list item li or an unordered list label has a type attribute, which is a solid circle by default. Commonly used are: 1.disc: solid circle 2.circle: hollow circle 3 .square: The solid square list label and the list item can be nested. The example code is as follows
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
</head>
<body>
    <ul type="square">
        <li>咖啡</li>
        <li>牛奶</li>
        <li><ul type="disc">
                <li>红茶</li>
                <li>绿茶</li>
            </ul>
        </li>
        <li type="circle">温水泡枸杞</li>
    </ul>
</body>
</html>

insert image description here

The ordered list

The ordered list is defined by ol, li defines a single list item, a single list item li or an ordered list label has a type attribute, and by default it is sorted by numbers. Commonly used are: 1.1: filled circle 2.a: lowercase alphabetical sorting 3. A: Uppercase alphabetical sorting 4.I: Roman numeral sorting can be nested between list labels and list items The example code is as follows
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
</head>
<body>
    <ol type="I">
        <li>牛奶</li>
        <li></li>
        <li>咖啡</li>
    </ol>
</body>
</htm

insert image description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325349090&siteId=291194637