html5: 使用 dl 元素将一个人与其学术头衔联系起来——适当的用法?
html5: Using the dl element to associate a person with its academic titles – appropriate usage?
在标记一个人的姓名和此人获得的学术头衔时,使用 <dl>
是否合适?像这样:
<dl>
<dt>John Doe</dt>
<dd>Doctor of Physical Therapy</dd>
<dd>Doctor of Pharmacy</dd>
</dl>
来自html5 spec:
The dl element represents an association list consisting of zero or more name-value groups (a description list).
[…]
Name-value groups may be terms and definitions, metadata topics and values, questions and answers, or any other groups of name-value data.
他们还给出了这个例子,看起来有点相似:
<dl>
<dt> Authors
<dd> John
<dd> Luke
<dt> Editor
<dd> Frank
</dl>
他们同时表示
The values within a group are alternatives; multiple paragraphs forming part of the same value must all be given within the same dd element.
我不太明白,这就是我在这里问的原因。
如果您想表达一个人的列表以及他们是什么,dl
似乎是合适的。
<dl>
<dt>John Doe</dt>
<dd>Doctor of Physical Therapy</dd>
<dd>Doctor of Pharmacy</dd>
</dl>
这告诉我 John Doe 是 物理治疗和药学博士(排名不分先后)。非常符合字典的精神;你列出了一个 term (dt
) 和它的 definition(s) (dd
)。我希望在这个 list (dl
) 中有更多的条目,而且它也应该是 styled 这样的定义列表。
如果这不是您的意图,微格式 hCard 可能更适合您。参见 http://microformats.org/wiki/hcard。
在标记一个人的姓名和此人获得的学术头衔时,使用 <dl>
是否合适?像这样:
<dl>
<dt>John Doe</dt>
<dd>Doctor of Physical Therapy</dd>
<dd>Doctor of Pharmacy</dd>
</dl>
来自html5 spec:
The dl element represents an association list consisting of zero or more name-value groups (a description list).
[…]
Name-value groups may be terms and definitions, metadata topics and values, questions and answers, or any other groups of name-value data.
他们还给出了这个例子,看起来有点相似:
<dl>
<dt> Authors
<dd> John
<dd> Luke
<dt> Editor
<dd> Frank
</dl>
他们同时表示
The values within a group are alternatives; multiple paragraphs forming part of the same value must all be given within the same dd element.
我不太明白,这就是我在这里问的原因。
如果您想表达一个人的列表以及他们是什么,dl
似乎是合适的。
<dl>
<dt>John Doe</dt>
<dd>Doctor of Physical Therapy</dd>
<dd>Doctor of Pharmacy</dd>
</dl>
这告诉我 John Doe 是 物理治疗和药学博士(排名不分先后)。非常符合字典的精神;你列出了一个 term (dt
) 和它的 definition(s) (dd
)。我希望在这个 list (dl
) 中有更多的条目,而且它也应该是 styled 这样的定义列表。
如果这不是您的意图,微格式 hCard 可能更适合您。参见 http://microformats.org/wiki/hcard。