Home > Web Front-end > Front-end Q&A > What is the usage of li tag in html5

What is the usage of li tag in html5

WBOY
Release: 2022-01-13 15:18:08
Original
5597 people have browsed it

In HTML5, the li tag is used to define the list items of the list. When used in conjunction with the ul tag and ol tag, it can be used to define unordered lists and ordered lists. The syntax is "

    Ordered List
" and "
  • Ordered List
".

What is the usage of li tag in html5

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

What is the usage of li tag in html5

  • tag defines list items, both in ordered list and unordered list Use the
  • tag.

    Differences between HTML 4.01 and HTML 5

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

    In HTML 5, the "type" attribute is no longer supported.

    In HTML 5, the "value" attribute is not deprecated, but can only be used with the

      element.

      The example is as follows:

      <html>
      <head> 
      <meta charset="utf-8"> 
      <title>123</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

      Output result:

      What is the usage of li tag in html5

      ##Recommended tutorial: "

      html video tutorial

  • The above is the detailed content of What is the usage of li tag in html5. 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