时间:2021-07-01 10:21:17 帮助过:79人阅读
In HTML 5,自闭合标签使用html5的doctype时不用写反斜杠。means , the start tag. It is not a "self-closing tag". Instead, certain elements are designated as having no end tag, for example
. These are collectively called void elements. The slash is just syntactic sugar for people who are addicted to XML. Using the slash in a non-void element tag is invalid, but browsers parse it as the start tag anyway, leading to a mismatch in end tags.