Skip to content

DL permits DIV as direct child since "HTML5" and adjacent DTs and DDs #28

Description

@myfonj

dl > *:not(dt):not(dd),

Sure this style predates HTML5 and HTML Living Standard, so hard to criticize, but nowadays it is allowed to have non-nested DIV elements inside DL:

https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element:concept-element-content-model

dt + *:not(dd),

Also AFAIK it newer was a mistake to have multiple definitiondescription therms defscribed by one or more DD.

So such sample should suffer no revenge:

<dl>
  <div>
   <dt>foo</dt>
   <dt>bar</dt>
   <dt>baz</dt>
   <dd>Very common metasyntactic variables.</dd>
   <dd>Frowned-upon words without meaning often seen in programming handbooks.</dd>
  </div>
  <div>
    <dt>metasyntactic variable</dt>
    <dd><q cite="https://en.wikipedia.org/wiki/Metasyntactic_variable">specific word or set of words identified as a placeholder in computer science and specifically computer programming</q></dd>
  </div>
</dl>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions