Markdown Basics

Markdown Links and Images: Alt Text, Paths, Hosting

How to write Markdown links, reference-style URLs, auto-links, and images — plus alt text for AI, relative vs absolute paths, and where to host images.

8 min readMarkdown Basics

Frequently asked questions

Can I link to a section inside the same document?+

Yes — use an anchor link. Write #your-heading-text in lowercase with dashes instead of spaces. Most renderers auto-generate these IDs from your H2 and H3 text.

Why does my image render as alt text instead of the picture?+

The file path is wrong or the renderer cannot reach the URL. Check that the path is correct relative to where the .md file lives, or switch to an absolute https:// URL hosted somewhere public.

Does alt text really matter for AI?+

Yes. Text-only models cannot see your image at all — alt text is the only thing they have to work with. Vision models can see the image, but alt text still helps anchor their interpretation and catches cases where the image fails to load.

What is a reference-style link and why would I use it?+

Reference links let you define the URL once at the bottom of the file and reuse the label throughout. Cleaner for long documents with many links, and easier to update — change the URL in one place.

Can I make a link open in a new tab in Markdown?+

Not with pure Markdown. You have to drop in an <a href="..." target="_blank"> HTML tag. Most renderers accept it. On platforms like GitHub and Notion, the behavior is controlled by the platform, not the source.

Keep learning

Put this into practice

Create a free Markdown Converters account to try everything you just read on your own documents.