How to put writing directly underneath each picture

Discussion in 'HTML & Website Design' started by paul_whiting09, May 25, 2014.

  1. #1
    Hello I have 5 images that I would like text to go under each image. How do i go about doing this?

    http://imgur.com/URb3Xeg

    
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <title>DVD World | Home</title>
    </head>
    <body>
    <a href="" title="The Wolverine"><img src="dvdcovers/wolverine.jpg" height="170" width="120" border="1" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="" title="Hercules"><img src="dvdcovers/hercules.jpg" height="170" width="120" border="1" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="" title="The Island"><img src="dvdcovers/theisland.jpg" height="170" width="120" border="1" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="" title="Paris"><img src="dvdcovers/paris.jpg" height="170" width="120" border="1" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="" title="Red"><img src="dvdcovers/red.jpg" height="170" width="120" border="1" /></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="" title="Garfield The Movie"><img src="dvdcovers/garfield.jpg" height="170" width="120" border="1" /></a>
    </body>
    </html>
    
    Code (markup):
    Thankyou.
     
    paul_whiting09, May 25, 2014 IP
  2. Dirk Dunn

    Dirk Dunn Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    There's a couple things you can do, I would say either place each image inside of a div, along with a <p> of whatever you want the text to be,

    OR

    Make a table with one row and each image and <p> inside of their own <td>

    Good Luck,

    Dirk
     
    Dirk Dunn, May 28, 2014 IP
  3. Dirk Dunn

    Dirk Dunn Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    <table>
    <tr>
    <td style="padding-left:10px;padding-right:10px"><a href="" title="The Wolverine"><img src="dvdcovers/wolverine.jpg" height="170" width="120" border="1" /></a><p>Title Here</p></td>
    <td style="padding-left:10px;padding-right:10px"><a href="" title="Hercules"><img src="dvdcovers/hercules.jpg" height="170" width="120" border="1" /></a><p>Title Here</p></td>
    <td style="padding-left:10px;padding-right:10px"><a href="" title="The Island"><img src="dvdcovers/theisland.jpg" height="170" width="120" border="1" /></a><p>Title Here</p></td>
    <td style="padding-left:10px;padding-right:10px"><a href="" title="Paris"><img src="dvdcovers/paris.jpg" height="170" width="120" border="1" /></a><p>Title Here</p></td>
    <td style="padding-left:10px;padding-right:10px"<a href="" title="Red"><img src="dvdcovers/red.jpg" height="170" width="120" border="1" /></a><p>Title Here</p></td>
    <td style="padding-left:10px;padding-right:10px"><a href="" title="Garfield The Movie"><img src="dvdcovers/garfield.jpg" height="170" width="120" border="1" /></a><p>Title Here</p></td>

    </tr>
    </table>

    if you want the text centered under the pictures, just add the text-align:center; to the style tags of the <td>'s
     
    Last edited: May 28, 2014
    Dirk Dunn, May 28, 2014 IP