SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Another 'Is this semantically correct?' thread

    Basically, if i wanted to show a gallery, with image thumnails & captions, would this be a sensible way of doing it?

    HTML Code:
    <dl>
     <dt><a href="largepic1.jpg"><img src="thumbnail1.jpg" /></a></dt>
      <dd>Caption 1</dd>
      
      <dt><a href="largepic2.jpg"><img src="thumbnail2.jpg" /></a></dt>
      <dd>Caption 2</dd>
      
      <dt><a href="largepic3.jpg"><img src="thumbnail3.jpg" /></a></dt>
      <dd>Caption 3</dd>
     ...
      </dl>
    ...or am i far better off just wrapping each <a><img /></a> and <p>caption</p> in a div with a class?

    Opinions? I thought of the dl list because its kind of defining the image to have the caption of whatever, but it also seems kind of weird at the same time.

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've seen it done that way. Another possibility would be to use an unordered list which then contains the image and caption in a paragraph.

  3. #3
    Non-Member deathshadow's Avatar
    Join Date
    Jul 2006
    Location
    Dublin, NH
    Posts
    901
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would say NO. Your image is not a term, and while the description COULD be considered a definition, that's really not what those tags are meant for.

    of course my tag reduction obsessed *** would be trying to do all that with one anchor tag per picture, and no other tags AT ALL.

  4. #4
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yeh, although I have seen some other tags used in places where you could kind of argue that it makes sense, but really it doesn't.

    Divs it is then.... The way i see it, you need something surrounding each image/caption combo, a container round the whole lot (just to set a width so you get the right number per line).

    This leads me to another thought...

    How good would it be if you could group elements in CSS? Like, you define a group somewhere in the stylesheet, then you can style that group.

    group galleryimage {
    div#gallery img
    div#gallery img + p
    }

    or something, then you could style that group... It'd be like putting divs around it all, but without having to...


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
  •