What is the label of li?

云罗郡主
Release: 2020-09-08 13:30:04
Original
26293 people have browsed it

The li tag is an element tag in the HTML language. It mainly defines list items. The li tag can be used in ordered lists ol and unordered lists ul. Currently, all mainstream browsers support the li tag.

What is the label of li?

What element is the li tag?

The li tag is an element tag in the HTML language, mainly defining list items , the li tag can be used in ordered lists ol and unordered lists ul. Currently, all major browsers support the li tag. [Recommended tutorial: HTMLTutorial]

Definition and usage

  • Tag definition list item.

  • tags can be used in ordered lists (
      ) and unordered lists (
        ).

        Differences between HTML and XHTML

        In HTML 4.01, the "type" and "value" attributes of the li element are deprecated.

        In XHTML 1.0 Strict DTD, the "type" and "value" attributes of the li element are not supported.

        For example:

        <!DOCTYPE html>
        <html>
        <head> 
        <meta charset="utf-8"> 
        <title>php中文网</title> 
        </head>
        <body>
        <p>有序列表:</p>
        <ol>
          <li>Coffee</li>
          <li>Tea</li>
          <li>Milk</li>
        </ol>
        <p>无序列表:</p>
        <ul>
          <li>Coffee</li>
          <li>Tea</li>
          <li>Milk</li>
        </ul>
        </body>
        </html>
        Copy after login

        The above is the detailed content of What is the label of 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
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!