我想执行以下操作,但它在语义上是否正确?
<button>
<div></div>
<div></div>
</button>
最佳答案
当前的 HTML5 草案说它是不正确的。
http://www.w3.org/TR/2012/WD-html5-20120329/the-button-element.html#the-button-element说 <button>
必须仅包含短语内容。短语内容定义为包括<span>
但不是 <div>
.
关于html - 将 <div> 或 <span> 放在 <button> 中在语义上是否不正确?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12982269/