" and "" appear in pairs and are used to define list items; the li tag can be used in ordered lists and unordered lists. And in the menu list, the syntax is "
  • list item value
  • ...
    "."> Is li a single tag in HTML5?-Front-end Q&A-php.cn

    Is li a single tag in HTML5?

    青灯夜游
    Release: 2021-12-17 11:08:00
    Original
    3357 people have browsed it

    In HTML5, li is not a single tag, but a double tag. "

  • " and "
  • " appear in pairs and are used to define list items; the li tag is available In ordered lists, unordered lists, and menu lists, the syntax is "
  • list item value
  • ...
    tag name>".

    Is li a single tag in HTML5?

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

    In HTML, keywords whose tags are surrounded by angle brackets usually appear in pairs, such as

    and

    . This The species is called "double-marked". Opening and closing tags are also known as opening tags and closing tags.

    There are also tags presented separately, such as:Is li a single tag in HTML5?, etc. This type of tag is called "single tag".

    Generally, tags that appear in pairs have their content in the middle of the two tags.

    So li is a single tag? Or double marking?

    Let's take a look at how it works:

    • Coffee
    • Tea
    • Milk
    Copy after login

    As you can see, theli tags are both "

  • " and "
  • " They appear in pairs, so li is a double marker.

  • Tags define list items.

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

        Example:

            HTML有序列表 
        

        煮米饭的步骤:

        1. 将水煮沸
        2. 加入一勺米
        3. 搅拌均匀
        4. 继续煮10分钟
        Copy after login

        Is li a single tag in HTML5?

        Ordered lists require the use of

          and
        1. tags:

            1. is the abbreviation of order list, which represents an ordered list. It can number each item in the list, starting from the number 1 by default.

            2. ##
            3. is the abbreviation of list item, which represents each item in the list. The number of
            4. in
                indicates how many pieces of content there are. List items can contain text, images, links, etc., or even another list.

                ##Note that
                  is generally used in conjunction with
                1. and will not appear alone, and it is not recommended to use it directly in
                    except for
                  1. other tags.
              HTML无序列表 
          

          早餐的种类:

          • 鸡蛋
          • 牛奶
          • 面包
          • 生菜
          Copy after login

          Is li a single tag in HTML5?Unordered lists require the use of

            and
          • tags:

                is unordered Short for list, which represents an unordered list.
                • is the same as
                • in
                    , indicating each item in the list. By default, each item in an unordered list is represented by
                  1. symbols.

                    ##Note that
                      is generally used in conjunction with
                    • and will not appear alone, and it is not recommended to use it directly in
                        except for
                      • other tags.
                      •  
                      • Copy after login

                        Related recommendations: "Is li a single tag in HTML5?html video tutorial

                        "

                        The above is the detailed content of Is li a single 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
    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!