[whatwg] Section nesting menu and an old HTML 3 friend LH

Explicitly semantically: use DD for header, DT as a wrapper for items.  It
means that a top-level list with a header must be wrapped in a DL for
completeness.

    <dl>
      <dt>Sample Menu</dt>
      <dd>
        <dl>
          <dt>File</dt>
          <dd>
            <ul>
              <li>New</li>
              <li>Open</li>
              <li>Save</li>
              <li>Properties</li>
              <li>Close</li>
              <li>Quit</li>
            </ul>
          </dd>
          <dt>Edit</dt>
          <dd>
            <ul>
              <li>Cut</li>
              <li>Copy</li>
              <li>Paste</li>
              <li>Clear</li>
              <li>Show Clipboard</li>
            </ul>
          </dd>
          <dt>Help</dt>
          <dd>
            <ul>
              <li>About</li>
              <li>Contents</li>
              <li>Index</li>
              <li>Search</li>
            </ul>
          </dd>
        </dl>
      </dd>
    </dl> 

HTH
Chris

-----Original Message-----
From: whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Tim Connor
Sent: Tuesday, April 03, 2007 10:12 PM
To: Spartanicus
Cc: whatwg at whatwg.org
Subject: Re: [whatwg] Section nesting menu and an old HTML 3 friend LH

Ya, it was fast and ugly - more pseudo mark-up to highlight the
questions than anything.  Of course, this is how things are
*currently* marked up in these situations - it's the only logical way.
 What I am driving at (very poorly, apparently, so you have my
apologies) is that some of us lowly authors DO want some sanctioned
way to associate those headers.

That's all I am asking. I know how to work with what exists. I also
just happen to know that hierarchies best represented by nested lists
are not that uncommon in creating web content.  Yes, you can make an
argument for using hn the whole way through (and those of us that
nit-pick how we should most semantically mark-up our content, do
debate that), instead of nesting lists, but that seems better suited
to when it's at a whole document level, rather than a list within a
document.  That also makes an outline with indentation (not to mention
a true menu) a total pain, and requires a bunch of unnecessary
additional css work (the addition of pointless classes, or a bunch of
sibling selector work).  After all, why else do we have the ability to
make nested lists.

Can we please have SOME method of strictly, explicitly semantically
associating headings within lists.  Wether it's bringing back a
deprecated element, or defining li/lu/ol as sectioning elements, or
some other way, I don't really care.  I'm okay with the current usage
of a hn within a list - heck, we're all pretty practiced at styling
that by now ;). I'm just confirming that there is no specified
semantic tie, currently, and asking if that is set in stone.

Basically, if we don't have <lh>, then why shouldn't headings as
sectioning/outlining tools be allowed in lists?  Am I just being
stupid, and missing something?

Thanks,
Tim

Received on Tuesday, 3 April 2007 14:28:52 UTC