Add an Image With Caption (HTML)

Here is a quick way to add an image or video to your website or posts (formatted, with a caption).

This is an image title
This is a caption

NOTE: If you are a designer I recommend using CSS to create a function for a caption and call with div tags. That takes longer to set up but will save you time in the long run. I know most of you can’t do that.. Don’t worry! This code is very easy to modify and to add to your posts.

As you can see there is an image of a skier with a grey caption on the right side of this post. This is the HTML used to create the image and caption on the right. It will work wherever you can post HTML. Important variables:

<table align=right cellpadding=3 style="font-family:arial; font-size:12px; color:gray">
  <tr><td><img src="http://dan.petsnick.com/~deleted~/city.jpg" alt="This is an image title" width=200 height=150></td></tr>
  <tr><td>This is a caption</td></tr>
</table>

Important variables:

  1. align=right This can also be align=left if you want the image on the left side of the page. Remove entirely if you want the image to appear on its own line and not within text.
  2. style=”font…” Use font-family font-size and color to define the font for your caption. Make it different from the rest of the text on the page.
  3. <img src=”http://…”> This is where your visual goes. Here an image was used. For flash and video replace with embed code.
  4. This is a caption Replace with your caption!

That’s it! Now just copy the entire code, edit the variables, and post it on your website, blog, or anywhere you are allowed to use basic HTML.

50 thoughts on “Add an Image With Caption (HTML)

  1. ^^ Not quite. The comments are moderated so there is a bit of a delay sometimes

  2. ^ You are supposed to separate presentation (style) from content. This means all formatting code goes in a CSS style sheet (another file).

  3. Hi there! I just wanted to ask if you ever have any issues with hackers? My last blog (wordpress) was hacked and I ended up losing many months of hard work due to no data backup. Do you have any methods to protect against hackers?

  4. Hello, I am looking for a nice shared hosting provider. Perhaps you can suggest one to me? I’d sign up via an aff link from you. Thanks. :)

  5. Dude, great post! I might seriously even pay attention to what you’re saying. Overall your entire blog is excellent. I am digging it.

  6. Hello! This is kind of off topic but I need some help from an established blog. Is it very hard to set up your own blog? I’m not very techincal but I can figure things out pretty fast. I’m thinking about creating my own but I’m not sure where to begin. Do you have any points or suggestions? Thanks

  7. you’re in reality a excellent webmaster. The site loading pace is incredible. It sort of feels that you are doing any unique trick. Also, The contents are masterpiece. you have performed a fantastic activity on this topic!

  8. I simply want to say I’m beginner to blogging and site-building and definitely enjoyed you’re web site. Probably I’m likely to bookmark your blog . You actually come with superb article content. Thanks for sharing your website page.

Comments are closed.