SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: Lists or low level headers?

  1. #1
    SitePoint Addict
    Join Date
    Aug 2010
    Posts
    279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lists or low level headers?

    I often find myself in a position where I'm listing some things out and using a few sentences to explain each list item. However, I often feel that sometimes these are important to my content and definitely could use header tags (h3 mainly).

    What do you guys do about this? Forgo the lists and just use <h3> and <p>? I would still like to keep the bullets though.

  2. #2
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use All of my headers, I use lists a little bit but not as much as you. you go into great detail. But if its working for you then stick with it.

  3. #3
    Life is not a malfunction gold trophysilver trophybronze trophy
    SitePoint Award Recipient TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    3,825
    Mentioned
    132 Post(s)
    Tagged
    5 Thread(s)
    That sounds like the sort of situation where I would use definition lists.

  4. #4
    SitePoint Addict
    Join Date
    Aug 2010
    Posts
    279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    huh, never heard of definition lists, I'll look into these.

  5. #5
    i want cake and cookies Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    9,996
    Mentioned
    41 Post(s)
    Tagged
    1 Thread(s)
    It's one of those questions where several solutions are all probably good enough, and the best one depends specifically on your content.

    Definition lists can be quite awesome, and while they can't have list-styles on them, you can have ul's inside the dd's so you could do

    <dl>
    <dt>header/thing</dt>
    <dd>
    <ul>
    list of thingies with bullets
    </ul>
    </dd>
    <dt>another header thing</dt>
    ... etc

    However dt's only show a semantic relationship between what's in them and all that's in the dd, in the way that a term is related to its definition. Looking at your document outline, these will not come up like heading tags will (you can also put heading tags inside dt's if that makes more sense):
    <dt><h3>some header</h3></dt>
    <dd>...

    but then you start really straying from bare minimum and you end up asking yourself what the dl tags are doing in there anyway... since a heading tag "heads" the content beneath it until either the next header OR the containing context ends.

  6. #6
    Mouse catcher silver trophy
    SitePoint Award Recipient Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,099
    Mentioned
    66 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Stomme poes View Post
    However dt's only show a semantic relationship between what's in them and all that's in the dd, in the way that a term is related to its definition. Looking at your document outline, these will not come up like heading tags will (you can also put heading tags inside dt's if that makes more sense):
    <dt><h3>some header</h3></dt>
    I don't think that's allowed ... you can have block elements in the <dd>, but <dt> is inline only.

    There's nothing wrong with having block elements in bulleted lists. Something along the lines of:
    Code:
    <ul>
    <li><h3>First item</h3>
        <p>Information about the first item</p></li>
    <li><h3>Second item</h3>
        <p>Information about the second item</p>
        <p>Lots and lots of it!</p></li>
    </ul>

  7. #7
    i want cake and cookies Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    9,996
    Mentioned
    41 Post(s)
    Tagged
    1 Thread(s)
    I don't think that's allowed ... you can have block elements in the <dd>, but <dt> is inline only.
    Ah, you are correct. Dts are blocks who may only have inlines children.

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
  •