Zero-Based HTML Introductory Tutorial (22) - Custom List

1. Mission objectives

In addition to ordered lists and unordered lists, we also have a custom list, and we need to be proficient in custom lists.

2. Custom list

A custom list is not just a list of items, but a combination of items and their annotations.
Custom listings start with a dl tag. Each custom list item starts with dt. The description of each custom list item begins with dd.

3. The code is as follows

<!DOCTYPE html>
<html lang="en">

<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">
    <title>Document</title>

</head>

<body>
    <dl>
        <dt>项目1</dt>
        <dd>内容1</dd>
        <dt>项目2</dt>
        <dd>内容2</dd>
    </dl>
</body>

</html>

The effect is as follows
insert image description here

4. Summary

We have learned about custom lists in this summary, and custom lists start with the dl tag. Each custom list item starts with dt. The description of each custom list item starts with dd. It is very commonly used in html and must be mastered proficiently.

Guess you like

Origin blog.csdn.net/weixin_61808806/article/details/128236755