« 头发乱了 | 首页 | 曹红党 »

lifesinger

个人主页: http://lifesinger.org/

留言(1 条)

HTML语言编写指南 留言:

dl用来表达对话,是html4规范中的一处horse’s mouth

Typical uses (and hence values) for definition lists include:

* glossaries, such as the example shown above (term: definition)
* event listing (title of event: description of event)
* web site directory (web site name with link: description of web site)

Some people use definition lists for the purposes of marking up dialogues (using dt to denote the speakers, and dd for the words they say). This approach has come straight from the horse’s mouth—the W3C HTML recommendation states that "Another application of dl is for marking up dialogs"—but many people argue that it represents bad practice and is somewhat misguided. You may see definitions lists used in this way, but arguably you shouldn’t use them for this purpose, despite what the W3C says, because they’re designed to mark up lists of definitions.