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>".
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 <div> and <code>
. 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: <img src="1.jpg" alt="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:
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Copy after login
As you can see, the li 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 (