# How do I add a caption to an image in Markdown?

> Markdown has no built-in caption syntax. The closest thing is alt text inside the image tag, ![Caption text](image.png), which shows when the image fails to load and is read by screen readers. For a visible caption, put an italic line directly under the image, or wrap it in an HTML <figure> and <figcaption> block if your renderer allows raw HTML.

- **Canonical URL**: https://memecub.com/guides/add-caption-to-image-markdown
- **Category**: How-tos (https://memecub.com/guides/c/howto)
- **Language**: en
- **Updated**: 2026-12-04

## Recommended Memes (Copy-Ready Markdown)

### No Caption Required

- **When to send**: Send when someone insists a picture needs no words at all.
- **Page**: https://memecub.com/meme/6mjl98vgaowk-no-caption-required
- **License**: Web-collected · Personal use

![No Caption Required](https://gpic.code-nav.cn/memecub/public/6mjl98vgaowk.png)

### Cursed Caption

- **When to send**: The reaction when a caption makes an image worse than it was.
- **Page**: https://memecub.com/meme/eld9uu5r6oae-cursed-caption
- **License**: Web-collected · Personal use

![Cursed Caption](https://gpic.code-nav.cn/memecub/public/eld9uu5r6oae.jpg)

### Just Let Me Use Markdown Damn It Jira

- **When to send**: For the moment a tool refuses to render your image or caption properly.
- **Page**: https://memecub.com/meme/n3mefsw32b96-just-let-me-use-markdown-damn-it-jira
- **License**: Web-collected · Personal use

![Just Let Me Use Markdown Damn It Jira](https://gpic.code-nav.cn/memecub/public/n3mefsw32b96.png)

### The World If I Could Format Jira Tickets With Markdown

- **When to send**: Pairs with any wish that a stubborn editor just supported Markdown.
- **Page**: https://memecub.com/meme/74i9j9n1pjnd-the-world-if-i-could-format-jira-tickets-with-markdown
- **License**: Web-collected · Personal use

![The World If I Could Format Jira Tickets With Markdown](https://gpic.code-nav.cn/memecub/public/74i9j9n1pjnd.png)

### Sample Text

- **When to send**: Use as the placeholder image while you test caption layouts.
- **Page**: https://memecub.com/meme/o688qbkvf4y4-sample-text
- **License**: Web-collected · Personal use

![Sample Text](https://gpic.code-nav.cn/memecub/public/o688qbkvf4y4.gif)

### Mother Of God (caption free)

- **When to send**: A caption-free image that says everything by itself.
- **Page**: https://memecub.com/meme/nfcm958krlpd-mother-of-god-caption-free
- **License**: Web-collected · Personal use

![Mother Of God (caption free)](https://gpic.code-nav.cn/memecub/public/nfcm958krlpd.jpg)

### Image life without Google &amp; Stack Overflow

- **When to send**: For the debugging session after your image path breaks.
- **Page**: https://memecub.com/meme/bxtrtmmz7myl-image-life-without-google-amp-stack-overflow
- **License**: Web-collected · Personal use

![Image life without Google &amp; Stack Overflow](https://gpic.code-nav.cn/memecub/public/bxtrtmmz7myl.jpg)

## The three ways to caption an image

Alt text: ![A cat asleep on a keyboard](cat.png). This is the only caption-like field in standard Markdown. It is not displayed under the image in most renderers, but it is what screen readers and search engines read.

Italic line under the image: put the image on one line, then *Figure 1: the cat, asleep* on the next. This is plain Markdown and works everywhere, though nothing ties the text to the image semantically.

HTML figure block: <figure><img src="cat.png" alt="A cat asleep on a keyboard"><figcaption>The cat, asleep</figcaption></figure>. Renders as a real caption in GitHub, many static site generators and most Markdown-to-HTML pipelines, but raw HTML is disabled on some platforms.

## Which one to use where

GitHub README or issue: alt text plus an italic line is safest. GitHub strips some HTML but keeps <figure> in most README contexts, so test before relying on it.

Docs sites and blogs (Hugo, Jekyll, Docusaurus, MkDocs): many support a caption through shortcodes or a plugin, and the italic line is the fallback that always works.

VS Code preview and most editors: the built-in preview shows alt text only on hover or on a broken image, so use the italic line if you need the caption visible while writing.

Chat and notes apps: if the caption is really a joke, skip the formatting debate and paste the image with a line of text under it.

## Common mistakes

Leaving alt text empty. ![ ](cat.png) is valid but tells screen readers nothing; write a short description instead.

Putting the caption inside the parentheses. ![cat](cat.png "A cat") is a title attribute, shown as a tooltip on hover, not a visible caption.

Using a local path that only works on your machine. Relative paths like images/cat.png work if the file is committed next to the Markdown; absolute paths like C:/Users/... break for everyone else.

Expecting one syntax to work everywhere. Markdown flavors differ, so pick the option your target renderer actually supports.

## If the caption is a joke

A caption is often the whole point of a meme. When you cannot find the right image for a line, memecub's AI meme maker lets you describe a character, an action and a caption and get an image back, or start from an existing meme as a reference.

For a document full of images, the AI meme placement tool takes an article and suggests a fitting meme for each paragraph, which saves the manual search.

## FAQ

### How do I put text under an image in Markdown?

Put the image on one line and an italic line directly beneath it, like *Figure 1: description*. If your renderer supports raw HTML, a <figure> with <figcaption> gives a proper caption instead.

### How do I add alt text to an image in Markdown?

Alt text goes in the square brackets: ![description of the image](image.png). Keep it short and descriptive; it is read by screen readers and shown when the image fails to load.

### Can I set the image size in Markdown?

Standard Markdown has no size syntax. Many renderers accept raw HTML such as <img src="cat.png" alt="cat" width="300">, and some support an attribute extension, so check your platform's docs.

### How do I insert an image from a local file?

Use a relative path from the Markdown file, for example ![cat](images/cat.png), and keep the image in the same repository or folder. Absolute paths from your own computer will not work for anyone else.

### Can you put emojis in Markdown?

Yes. You can paste the emoji character directly, or use a shortcode like :smile: on platforms such as GitHub that support it.

## Related Guides

- [How do I send a happy birthday meme?](https://memecub.com/guides/how-to-send-happy-birthday-meme.md) ([HTML](https://memecub.com/guides/how-to-send-happy-birthday-meme))
- [How do I add text to a blank meme template?](https://memecub.com/guides/add-text-to-blank-meme-template.md) ([HTML](https://memecub.com/guides/add-text-to-blank-meme-template))
- [How do I add an image to a Markdown file?](https://memecub.com/guides/how-to-add-image-markdown.md) ([HTML](https://memecub.com/guides/how-to-add-image-markdown))
- [How do I add a meme to a Markdown file in VS Code?](https://memecub.com/guides/add-meme-markdown-vscode.md) ([HTML](https://memecub.com/guides/add-meme-markdown-vscode))
- [How do I insert a meme in Markdown using an API?](https://memecub.com/guides/insert-meme-markdown-api.md) ([HTML](https://memecub.com/guides/insert-meme-markdown-api))
- [How do I resize an image in Markdown?](https://memecub.com/guides/resize-image-in-markdown.md) ([HTML](https://memecub.com/guides/resize-image-in-markdown))

---
Provided by [memecub](https://memecub.com) · Full index: [https://memecub.com/llms.txt](https://memecub.com/llms.txt) · Remote MCP: `https://memecub.com/mcp`