Complete Markdown Guide: Syntax, Examples & Tips
Complete Markdown guide with syntax, examples, tips, and common mistakes. Learn to write cleaner docs, notes, and posts—start mastering Markdown today.
Introduction
Markdown is a lightweight way to format plain text without a complex editor. You write simple symbols like #, *, and [], and Markdown turns them into headings, lists, links, and more. That makes it fast to write, easy to read in raw form, and simple to convert into HTML or published content.
People use Markdown because it fits real workflows: notes, README files, documentation, GitHub issues, blog drafts, and knowledge bases. It keeps content portable across tools, so you can move text from a plain text editor to a CMS or static site generator without losing structure. If you want a practical Markdown for documentation workflow, this format is one of the easiest ways to keep writing clean and maintainable.
This guide covers core syntax, extended features, common mistakes, and where Markdown shows up in everyday work. You’ll see examples you can copy into notes, docs, GitHub, or blogs, plus the pitfalls that trip up beginners.
By the end, you’ll have a usable mental model of Markdown, a quick-reference Markdown cheat sheet, and best-practice tips you can apply immediately.
What Is Markdown?
Markdown is a lightweight markup language, not a programming language. You write plain text with simple symbols like #, *, and [], and a parser or renderer converts it into formatted output such as HTML, headings, lists, and links.
Its origin is simple: make text easy to write in a plain text editor and easy to publish later. That is why Markdown works so well for README files, documentation, notes, blog drafts, and issue trackers.
The main benefits are clear source files that stay human-readable, portability across tools, and easy version control in Git. CommonMark serves as a widely referenced baseline for core Markdown behavior, but many platforms add extensions for tables, task lists, or footnotes, so Markdown can look slightly different in GitHub, Notion, Obsidian, or a CMS.
How Do You Use Markdown?
You use Markdown by typing plain text with special syntax and then previewing or publishing it in a renderer that understands the format. A plain text editor is enough to write it, while a WYSIWYG editor can hide the syntax and show the formatted result as you type.
A simple workflow looks like this:
- Open a Markdown editor or plain text editor.
- Write your content using headings, lists, links, images, and code spans.
- Preview the result in your editor or publishing platform.
- Export, commit, or publish the file as Markdown or HTML.
This is why Markdown is common in GitHub README files, documentation sites, and static site generator workflows. It gives you a clean source file that is easy to edit, review, and reuse.
Is Markdown Easy to Learn?
Yes. Markdown is easy to learn because the core syntax is small and consistent. Most people can learn headings, emphasis, lists, links, and code blocks in a single session.
The main challenge is not the syntax itself but the differences between renderers. CommonMark defines a shared baseline, while GitHub Flavored Markdown and other editors add extra features or slightly different behavior. Once you understand that variation, Markdown becomes straightforward to use.
Markdown vs HTML vs WYSIWYG Editors
Markdown is faster to write than HTML and easier to move between tools, which is why it works well for notes, README files, docs, blogs, GitHub content, and static site generator workflows. HTML gives you finer control over layout, classes, and custom embeds, but it takes more time and is harder to scan in raw form. A WYSIWYG editor is easier for beginners because you format visually, yet it can hide messy underlying markup that is harder to clean up later.
Use Markdown when you want speed and portability; use HTML inside Markdown only for edge cases like unsupported tables, custom styling, or complex embeds. For publishing workflows, see Markdown publishing tips and Markdown for documentation. In a complete guide, the practical rule is simple: Markdown for writing, HTML for precision, WYSIWYG for convenience.
Basic Markdown Syntax
Headings
Use # for headings: # = H1, ## = H2, down to ###### = H6. Keep one H1 per page, then use headings in order for readable structure.
Example:
# Main Title
## Section Title
### Subsection Title
Bold and Italic Text
For emphasis, use *italic*, **bold**, or ***bold italic***. Asterisks and underscores both work, but stay consistent.
Example:
*italic*
**bold**
***bold italic***
Lists
Lists use - or * for bullets and 1. for steps. Indent nested lists with two or four spaces, depending on the renderer.
Example:
- Item one
- Item two
- Nested item
1. First step
2. Second step
Links and Images
Links use square brackets for the text and parentheses for the URL: [text](https://example.com). Images use the same pattern with an exclamation mark in front: . The alt text should describe the image clearly for accessibility and fallback display.
Example:
[Markdown cheat sheet](https://markdownmastery.com/blog/markdown-cheat-sheet)

Code Spans and Code Blocks
Use code spans for short inline code like code spans, file names, or commands. Use fenced code blocks for longer examples.
Example:
Inline code: `npm install`
```js
console.log("Hello");
## Extended Markdown Syntax
Extended Markdown features go beyond the core spec and are often added by GitHub Flavored Markdown or specific editors. Support varies by platform, so confirm your renderer before relying on tables, task lists, footnotes, or anchor links.
### Tables
Tables are useful for comparisons, specs, and reference content. They are supported in GitHub Flavored Markdown and many Markdown editors.
Example:
```md
| Feature | Supported |
| --- | --- |
| Tables | Yes |
| Footnotes | Sometimes |
Fenced Code Blocks and Syntax Highlighting
Use fenced code blocks with language identifiers like js, bash, or md to trigger syntax highlighting when the renderer supports it. This is especially useful in documentation and README files.
Blockquotes
Blockquotes are useful for notes, warnings, and quoted material.
Example:
> Markdown is designed to be easy to read and easy to write.
Task Lists, Footnotes, and Anchor Links
Task lists help with planning, footnotes help with references, and anchor links help readers jump to sections in long documents. These features are common in GitHub Flavored Markdown and some Markdown editors, but not every renderer supports them.
Example:
- [x] Draft the README
- [ ] Add screenshots
Here is a note with a footnote.[^1]
[^1]: Footnote text.
Escaping Characters, Editors, and Best Practices
Use a backslash to escape literal Markdown symbols: \* for asterisks, \_ for underscores, \[ and \] for brackets, and \` for backticks. This prevents accidental emphasis, broken links, or code formatting when you only want the character itself.
For writing, a plain text editor works for maximum portability, but dedicated Markdown editors like Typora, Obsidian, Visual Studio Code, and Dillinger add live preview and syntax help. Use Markdown publishing tips to match your editor to your publishing workflow.
Good Markdown habits include consistent heading levels, descriptive link text, strong alt text, clear anchor links, and code formatting only where it improves readability. If you are writing for GitHub or documentation, keep filenames, section titles, and links predictable so readers can scan quickly.
Where Markdown Is Used
Markdown shows up anywhere people need fast, readable formatting without fighting a heavy editor. Teams use it for documentation, README files on GitHub, knowledge bases, internal wikis, and developer workflows because plain text is easy to review in pull requests and track in version control. Writers also use Markdown for blogs and content drafts, especially when a static site generator like Jekyll, Hugo, or Eleventy turns the text into a published page.
It works well for collaboration because the source stays clean and diff-friendly. You can edit a README, update docs, or revise a blog post in a text editor, commit the change, and let the publishing system handle the rest. That same simplicity makes Markdown popular in note-taking apps like Obsidian and Typora, and in editors like Visual Studio Code and Dillinger, where you want quick capture now and structured output later. For a docs-first workflow, see Markdown for documentation and Markdown publishing tips.
What Is GitHub Flavored Markdown?
GitHub Flavored Markdown, often called GFM, is GitHub’s extension of Markdown. It adds features that are especially useful in repositories and collaboration, including tables, task lists, strikethrough, autolinks, and better support for code blocks in README files and issues.
If you write on GitHub, GFM is the version you are most likely using. It is one reason Markdown feels so practical for project documentation and issue tracking.
What Are the Best Markdown Editors?
The best Markdown editor depends on your workflow. Typora is popular for distraction-free writing with live rendering. Obsidian is strong for note-taking and linked knowledge bases. Visual Studio Code is a good choice if you want editing, preview, and extension support in one place. Dillinger is a simple browser-based option for quick drafting.
Other Markdown editors may be better for publishing, collaboration, or team documentation, but these four cover most beginner and intermediate use cases. If you want a deeper comparison, see best Markdown editors.
What Is the Best Markdown Cheat Sheet for Beginners?
The best cheat sheet is one that covers the core syntax you will actually use: headings, bold and italic text, lists, links, images, code spans, fenced code blocks, blockquotes, tables, and escaping characters. A good beginner cheat sheet should also show the difference between core Markdown and GitHub Flavored Markdown so you know which features are portable.
For a practical reference, use the Markdown cheat sheet while you write and keep it open until the syntax feels automatic.
Quick Markdown Cheat Sheet
- Headings:
# H1through###### H6 - Emphasis:
*italic*,**bold**,***bold italic*** - Lists:
- itemor1. item - Links:
[text](https://example.com) - Images:
 - Code spans:
`inline code` - Code blocks: triple backticks
- Tables: use pipes
|and hyphens- - Blockquotes:
> quoted text - Escaping:
\*,\_,\[,\],\`
Conclusion
Markdown is easy to learn because you only need a small set of rules to handle most real writing tasks. Once you memorize headings, lists, links, emphasis, images, tables, and code blocks, you can write documentation, blog posts, and README files with far less friction than HTML or rich-text editors.
Your next step is practical: open a text editor, write a short README or note, and apply the cheat sheet as you go. If you want to build confidence faster, keep practicing in a real document and compare your raw Markdown to the rendered result. That repetition is what turns Markdown from a syntax list into a reliable workflow.