Home > Web Front-end > HTML Tutorial > In HTML lists, what are the differences between dl(dt,dd), ul(li), and ol(li)?

In HTML lists, what are the differences between dl(dt,dd), ul(li), and ol(li)?

php中世界最好的语言
Release: 2018-01-26 09:55:22
Original
3507 people have browsed it

This time I will bring you the difference between dl(dt,dd), ul(li), and ol(li) in the HTML list. In the HTML list, use dl( What are the precautions for dt, dd), ul(li), ol(li)? The following is a practical case, let’s take a look.

HTML

tag

#Definition and usage

tag defines the definition list (definition list) .
tag is used to combine
(defines the item in the list) and
(describes the item in the list).

#Example

The code is as follows:

<dl>
   <dt>计算机</dt>
   <dd>用来计算的仪器 ... ...</dd>
   <dt>显示器</dt>
   <dd>以视觉方式显示信息的装置 ... ...</dd>
</dl>
Copy after login

HTML

    Tag

    #Definition and usage

      Tags define an unordered list.

      #Example

      Unordered HTML list:

      <ul>
        <li>Coffee</li>
        <li>Tea</li>
        <li>Milk</li>
      </ul>
      Copy after login

      HTML

        Tags

        #Definition and usage

        < ol> tag defines an ordered list.

        #Example

        Ordered HTML list:

        <ol>
          <li>Coffee</li>
          <li>Tea</li>
          <li>Milk</li>
        </ol>
        Copy after login

        ul can be combined with ol to define menus and submenus

        <ul>
            <li><a href="#">内容过滤</a><li>
            <li><a href="#">词语过滤</a></li>
            <li class="s">
                <div class="lsub">
                    <div>论坛</div>
                    <ol>
                        <li><a href="#">论坛主题管理</a></li>
                        <li><a href="#">论坛批量删帖</a></li>
                    </ol>
                </div>
            </li>
        <ul>
        Copy after login

        I believe you have mastered it after reading these cases For more exciting methods, please pay attention to other related articles on the php Chinese website!

        Related reading:

        How to set focus on HTML elements

        How to use a hyperlink to open a new window and control the Window attributes

        How to use a tag href attribute and onclick event

        The above is the detailed content of In HTML lists, what are the differences between dl(dt,dd), ul(li), and ol(li)?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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