• Hi Folk ??
    I just have a suggestion about the list of links in the left part of the index.php file of WP.
    I think it’s semantically more correct to use <dt>...</dt><dl>...</dl></code rather than a list of lists.
    and put in the
    DL tag an ul list.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter karim

    (@karim)

    indeed, you define your categories by a list of links :

    <dt>Categories</dt>
    <dl>

    • cat1
    • cat2
    • cat3
    • ...

    </dl>

    Actually, the example given by mark’s link was good:

    <dl>
    <dt>Vole</dt>
    <dd>Small creature related to the weasel</dd>
    <dt>Weasel</dt>
    <dd>Small creature related to the vole</dd>
    </dl>

    dl looks like it is supposed to encapsulate all ‘d’ tags, much like ul/ol encapsulate li tags. so, based at least on some of the examples I’ve seen, it’s not really meant to markup the way you used it. it would be nice if there was a ‘lt’ tag for ‘list title’ or something like that, which is what you are going after. But you can style the UL, and override on the LI, or simply put a span around your title.
    It would be nice to kick this around and figure out what the appropriate ‘WP standard’ will be going forward, as applying CSS easily to some of the lists (not just WP generated, but even my own custom stuff) can be confusing without a well defined markup.
    -d

    Perhaps I wasn’t precise enough with my references.
    Definition lists are most commonly used in glossary’s and indexes, but can be used anywhere that a short section of text is followed by a longer segment. – source – About : webdesign
    This is an ideal way to set up a glossary or list of terms. – source – XHTMl user guide
    Or you can go straight to the definitive source…
    Definition lists vary only slightly from other types of lists in that list items consist of two parts: a term and a description. – source – W3C
    In the sense of writing the code, you are defining categories, but you are not literally defining them.
    The <nl> tag looks nice.

    There was a discussion over at SimpleBits a while back about this exact same thing.
    https://www.simplebits.com/bits/simplequiz/#entry550
    And another discussion very similar to the above but this time with numbered list pairs
    https://www.simplebits.com/bits/simplequiz/#entry673
    I hope this helps.

    BTW what happened to the font in this thread? Someone forgot the close a [/code] tag methinks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘semantic suggestion’ is closed to new replies.