我需要在页面中显示一个列表,比方说,应该或多或少呈现如下的人的属性:
name: Name
date: 1/1/2000
other: Other
阅读doc他们说:
The LABEL element may be used to attach information to controls.
那么,包含name、date...等属性名称的标签是否正确?
即使没有 <input>
关联?
最佳答案
不,根据 Quentin’s answer .
但是,在 HTML5 中, <dl>
can be used for generic associations其中 <label>
不合适。
关于forms - 是否允许在没有标签控件的情况下使用 <label> 标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12195052/