" 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 "
"."/>
" 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 "
".">
Home > Article > Web Front-end > Is li a single tag in HTML5?
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 "tag name>".
list item value ...
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>
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>
As you can see, the li tags are both "
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!