15

Sometimes I need to upload an image and then add some description about it.

I think the post could have more quality if I could put some caption just down the image. Is there some way to do that?

3
  • Images are rarely necessary. In the event that one is truly needed, what does an automatic caption really add over simply typing some descriptive text before or after the image?
    – nobody
    Commented May 20, 2014 at 14:06
  • Well, technically nothing, esthetically I think is better, also for users reading an answer/question that have images is easier to know about what images are if image have some caption. Otherwise, users have to read around to find out about what images are. Commented May 20, 2014 at 14:14
  • Try using the <sup> ... </sup> markup on your captions directly beneath the photo you wish to describe. It will help visually separate the caption text from the body of your post.
    – Robert Cartaino Mod
    Commented May 20, 2014 at 14:38

3 Answers 3

13

Stack Exchange does not support the <caption> ... </caption> tags, but you can simulate a captioning-style effect by using a bit of HTML.

Place your caption text below your photo and enclose it between <sup> ... </sup> tags to help the caption stand out from the rest of the text. You can (optionally) also use the <i>italics</i> elements to make the text stand out even further.

<sup><i> Your caption goes here. </i></sup>

a frivolous unicorn picture Nothing to see here. Just captioning a photo licensed for reuse, but is admittedly completely unrelated to anything said here.

But try not to overdo it. Images are typically a small part of a post, and should only be used where it substantively helps understanding.

4
  • Good enough! Something like is what I was looking for. Commented May 20, 2014 at 15:16
  • What if the imege isn't so wide? Commented May 20, 2014 at 15:25
  • @RaydelMiranda You can force linefeeds in your text by adding 2 spaces before you hit <ENTER>.
    – Robert Cartaino Mod
    Commented May 20, 2014 at 16:17
  • How to make this work for two medium images side by side? (FYI, one can resize the image by adding a suffix like 'm' to image url) Commented Mar 2, 2018 at 10:51
7

Not exactly a caption, but you can have a tooltip displayed (in most browsers) when hovering the mouse pointer over the image.

![alt text for image][1]

[1]: https://i.sstatic.net/bmetA.jpg "tooltip text goes here"

Example:

![Statler and Waldorf][1]

[1]: https://i.sstatic.net/bmetA.jpg "Everybody's favorite curmudgeonly muppets"

Statler and Waldorf

2

You can group a picture with a caption by enclosing them in a <kbd>...</kbd> pair.

This is a misuse of the <kbd> tag, the original purpose of which is to indicate keyboard input such as Ctrl+a. However, it has the advantage over other captioning methods of allowing the placement of captioned images side-by-side:

Heat Miser and minions
Heat Miser
The Year Without a Santa Claus (1974)
Snow Miser and minions
Snow Miser
The Year Without a Santa Claus (1974)

You'll need to add line breaks manually. Use <br> to force each caption to appear below its image, and additional <br> tags as necessary to force breaks in long captions:

<kbd>[![Heat Miser and minions][1]][1]<br>Heat Miser<br>[*The Year Without a Santa Claus*][3] (1974)</kbd>
<kbd>[![Snow Miser and minions][2]][2]<br>Snow Miser<br>[*The Year Without a Santa Claus*][3] (1974)</kbd>

  [1]: https://i.sstatic.net/WL9xT.jpg?s=256
  [2]: https://i.sstatic.net/5cX6I.jpg?s=256

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .