> 之间的区别或"/>在 HTML 中

2022-01-18 00:00:00 tags html

<...>和<.../>有什么区别

Is there any difference between <...> and <.../>

非常直接:

<meta charset="utf-8">
<meta charset="utf-8" />

在执行、功能等方面有什么不同吗?

Is there any difference in execution, functions etc.?

推荐答案

XHTML 要求 ("br", "input", "img") 等元素的尾部斜杠,而在 HTML5 中它们是可选的.

XHTML requires trailing slashes for elements like ("br", "input", "img") whereas in HTML5 they're optional.

请参阅:我应该删除元标记中的尾部斜杠吗?

另请参阅:HTML 5 是否使用尾部斜杠

相关文章