SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Feb 2003
    Location
    eez
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is this valid xhtml (semantical)?

    Hi!

    Is this semantical?

    HTML Code:
    <dl> 
    <dt>...</dt>
    <dd>...</dd>
    <dd>...</dd>
    <dd>...</dd>
    </dl>

    This list have just 1 "dt, dd" group. But the same list can have 2 or more such groups also.

    Even when the dl only has 1 group, should I mark it up as a dl? (same question with a <ul> with just 1 <li>)

    Thanks!

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A list with only one item is a special case of a list. It's semantically correct if the list could contain more items. For instance, if you're displaying search results and a particular query returns a single hit.

    For a hard-coded list, it's more of a grey zone, but it's syntactically valid and you could always argue that it is a special case.
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    276
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can I suggest you use the same topic in the future? I've seen at least three of your topics asking about deflists..
    "Never imagine yourself not to be otherwise than what
    it might appear to others that what you were or might
    have been was not otherwise than what you had been
    would have appeared to them to be otherwise."


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •