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, , 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.
Send when someone insists a picture needs no words at all.
The reaction when a caption makes an image worse than it was.
For the moment a tool refuses to render your image or caption properly.
Pairs with any wish that a stubborn editor just supported Markdown.
Use as the placeholder image while you test caption layouts.
A caption-free image that says everything by itself.
For the debugging session after your image path breaks.
The three ways to caption an image
Alt text: . 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.  is valid but tells screen readers nothing; write a short description instead.
Putting the caption inside the parentheses.  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.
Nothing quite right? Make one
Pick a character, type a caption, get it in about 10 seconds — free to try.
More that fit
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: . 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 , 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.