[whatwg] Suggest making <dt> and <dd> valid in <ol>
Ian Yang
ian.html at gmail.com
Sat Jul 14 08:53:32 PDT 2012
Okay, it seems that one of the ideas I mentioned in my original email needs
to be revamped.
I was saying that using general heading (<H1>) and paragraph (<p>) loses
the meaning of "definition term" and "definition description", but I didn't
realize that using <ol> loses the meaning of "definition list". That is,
the following code is, in fact, improper:
<!-- The following code is improper as it loses the meaning of "definition
list". -->
<ol>
<li>
<dt></dt>
<dd></dd>
</li>
<li>
<dt></dt>
<dd></dd>
</li>
<li>
<dt></dt>
<dd></dd>
</li>
</ol>
2012/7/14 Anne van Kesteren <annevk at annevk.nl>
> I believe it was added to the specification for the kind of question
> that came up here. The "why do we have <ul> and <ol> but not <dl> and
> <odl>?" question.
>
That's a good idea. Thank you :)
********************
So based on the <ul> and the <ol>, we could have unordered definition list (
<udl>) and ordered definition list (<odl>).
When contents of a definition list are unordered, we could use:
<udl>
<li>
<dt></dt>
<dd></dd>
</li>
<li>
<dt></dt>
<dd></dd>
</li>
<li>
<dt></dt>
<dd></dd>
</li>
</udl>
And when contents of a definition list are ordered, we could use:
<odl>
<li>
<dt></dt>
<dd></dd>
</li>
<li>
<dt></dt>
<dd></dd>
</li>
<li>
<dt></dt>
<dd></dd>
</li>
</odl>
Sincerely,
Ian Yang
More information about the whatwg
mailing list