SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Aug 2010
    Posts
    349
    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
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,405
    Mentioned
    273 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
    349
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    huh, never heard of definition lists, I'll look into these.

  5. #5
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 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 Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 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>


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
  •