gpt4 book ai didi

html - self 关闭的 HTML/XML 标签的正确术语是什么?

转载 作者:太空狗 更新时间:2023-10-29 14:43:27 24 4
gpt4 key购买 nike

我不记得用来描述自关闭的 html 标签之间的区别的术语,

例如,<hr />自己关闭。

<p>This doesn't</p>

最佳答案

XML specification 使用的术语是:

Empty-element tag

relevant part规范说:

Tags for Empty Elements

[44]  EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [WFC: Unique Att Spec]

Empty-element tags may be used for any element which has no content, whether or not it is declared using the keyword EMPTY. For interoperability, the empty-element tag SHOULD be used, and SHOULD only be used, for elements which are declared EMPTY.

但是,您可能还经常听到术语自闭合标签

关于html - self 关闭的 HTML/XML 标签的正确术语是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6364919/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com