在普通标签上使用XHTML斜杠(/)? [英] Using the XHTML closing slash (/) on normal tags?
本文介绍了在普通标签上使用XHTML斜杠(/)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是想知道关闭一个通用标签是否可以接受,例如. <span>
,它不需要使用XHTML斜杠来减少标记的数据.
I was just wondering whether it is acceptable to close a common tag, eg. a <span>
which requires no data using the XHTML closing slash to reduce markup.
例如:
<span id='hello'></span>
可以写为
<span id='hello' />
推荐答案
不可以,span
不是自动关闭标记.这是自动关闭标签:
No you can't do that, span
is not self-closing tag. Here are the self closing tags:
<area />
<base />
<basefont />
<br />
<hr />
<input />
<img />
<link />
<meta />
这篇关于在普通标签上使用XHTML斜杠(/)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文