Search code examples
htmlvalidationsemantic-markup

Appropriate use of DL and DD?


I had some site templates designed for me recently. I got the final HTML code, which validates, but the structure of the document is laid out using DL-DD pairs:

<dl>
  <dd class="some-class">
    Some text.
  </dd>
</dl>

I'm not especially familiar with those tags as I've never used them much, but they don't seem intended for document structure. Am I right? Why would a designer do this?


Solution

  • You're right in that it shouldn't be used like that. The only reason I can think of for the designer using them is that the <dd> tag is indented in most browsers. If they're overriding the padding/margins on them, then your guess is as good as mine.