A title
A description

Valid html tag to group list items

I currently have:

<dl>

  <span class="wrapper">

    <dt>A title</dt>
    <dd>A description</dd>

  </span>

  <span class="wrapper">

    <dt>A title</dt>
    <dd>A description</dd>

  </span>

</dl>

This (or divs instead of spans) is not checked. Is there anything that I could relate to this?

+5
source share
2 answers

No. A dlallows only two kinds of children: dtand dd. See this article for a more detailed explanation .

In short: the reason that dtand ddare not grouped, is that you can have one or more elements dtfor dd.

If you really need to group, then the only option is to create the list manually using <ul>/ <ol>with the necessary CSS.

+5

"" . <dl>. HTML .

0

All Articles