Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8084761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:53:37+00:00 2026-06-05T17:53:37+00:00

I wish HTML could do something semantically equivalent to this; <dl class=main-list> <definitionitem> <dt>Some

  • 0

I wish HTML could do something semantically equivalent to this;

<dl class="main-list">
    <definitionitem>
        <dt>Some Thing</dt>
            <dd>You know it!</dd>
        <dt>Another Thing</dt>
            <dd>Word.</dd>
    </definitionitem>
    <definitionitem>
        <dt>Stuff</dt>
            <dd>Alright!</dd>
    </definitionitem>
</dl>

However, since the closest I’ve come is something I’m not 100% satisfied with the semantics of;

<div class="redundant-wrapper">
    <dl class="main-list">
        <dt>Some Thing</dt>
            <dd>You know it!</dd>
        <dt>Another Thing</dt>
            <dd>Word.</dd>
    </dl>
    <dl class="another-main-list">
        <dt>Stuff!</dt>
            <dd>Alright!</dd>
    </dl>
</div>

I was wondering if anyone has any other ideas of how you might do this?

Also, the reason the items would be grouped is because they are visually grouped in the content that is being marked up. Imagine a dictionary page, with a single definition list, where each definition is in an inset box that is floated left. I run into this situation all the time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:53:38+00:00Added an answer on June 5, 2026 at 5:53 pm

    No, Ian Hickson (HTML spec editor) is convinced that this is a CSS problem, not an HTML one:

    This shouldn’t be necessary. It’s a limitation of CSS.

    The right solution is for CSS to provide some pseudo-element or other
    mechanism that introduces an anonymous container into the rendering
    tree that wraps the elements you want to wrap.

    At the same time, fantasai (CSS spec editor) is convinced in contrary:

    I don’t think this is a CSS problem. I think it’s an HTML problem.
    Pseudo-elements are a non-trivial thing to spec, and a non-trivial
    thing to implement, and a comparatively confusing thing to use.

    Nevertheless, Ian apparently ignores that and continues to be detached from reality.

    There are same problems with LEGEND (that must be first direct child of FIELDSET according to HTML spec), FIGCAPTION (that must be first/last direct child of FIGURE), and LI (direct child of UL/OL).

    As for DT/DD in particular, I personally use UL list with DL inside each of LI:

    <ul>
        <li><dl>
            <dt>Lorem</dt>
            <dd>Lorem definition</dd>
        </dl></li>
    
        <li><dl>
            <dt>Ipsum</dt>
            <dd>Ipsum definition</dd>
        </dl></li>
    </ul>
    

    So we have DL to make relation between DT and DD, and UL list to make them all belong to one list.

    Update (2016-11-14): The HTML standard (WHATWG version for now) now (since 2016-10-31) allows the DIV element (optionally intermixed with so-called script-supporting elements SCRIPT, TEMPLATE) to be direct children of DL elements. W3C’s HTML validator does not account for this change yet, but the experimental HTML5.org validator does.

    Update (2017-01-18): Turns out the spec does not allow more than one nested DIV wrapper for DT/DD, so usefulness of the feature in practice is actually very limited and the UL→LI→DL approach described here is still relevant.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish for a class A to contain some data, and class B will
I wish I could go all the elements of an ASP.Net page (HTML elements)
I am currently processing text/html data and I wish to store my results in
Possible Duplicate: HTML.ActionLink method In my ASP.NET MVC 3 application, I wish to generate
I wish I could write LINQ to Entity queries that called other functions: from
I wish I could have tested it myself, but unfortunately it's impossible to do
I have an android application that parses some HTML, downloads an image, and displays
Today my wish is to take text form the string. This string must be,
Anyone know of a good example of generating HTML e-mail with embedded images and
I wish to create (in the R language) a decimal HTML decoder such as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.