Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Image gallery

Quick question, What is the best HTML5 structure for a photo gallery of 12 images. Should I use a table base layout or an ul layout. I want each image to have an h3 heading and a p centered under the image as well. I want the image to be linked (click-able) Is there a video tutorial for the best practice. thanks db

2 Answers

Tables should be used for tabulated data not for layout purposes. I would go with an unordered list.

The structure you describe could be achieved like this, how you style it is up to you!

<ul>
   <li>
      <a href="#"><img src="#" /></a>
      <h3>Image 1</h3>
      <p>Lorem ipsum dolor</p>
   </li>
   <li>
      <a href="#"><img src="#" /></a>
      <h3>Image 2</h3>
      <p>Lorem ipsum dolor</p>
   </li>
</ul>

Hi Richard, Thank you, this is just what I did but I'm second guessing myself.

Well don't! :)