Skip to main content

Complete Markdown Guide

Learn everything you need to know about Markdown syntax and formatting. From basics to advanced techniques.

What is Markdown?

Markdown is a lightweight markup language that allows you to format text using simple, readable syntax. It's widely used for documentation, blogs, README files, and anywhere you need formatted text without HTML complexity.

Basic Syntax

Headers
# H1 Header ## H2 Header ### H3 Header #### H4 Header ##### H5 Header ###### H6 Header

Use 1-6 hash symbols (#) followed by a space to create headers of different levels.

Text Formatting
**Bold text** *Italic text* ***Bold and italic*** ~~Strikethrough~~ `Inline code`

Format text with asterisks, underscores, tildes, and backticks.

Lists
Unordered list: - Item 1 - Item 2 - Nested item - Another nested item Ordered list: 1. First item 2. Second item 3. Third item

Create bulleted or numbered lists with dashes or numbers.

Links and Images
[Link text](https://example.com) [Link with title](https://example.com "Link title") ![Image alt text](image-url.jpg) ![Image with title](image-url.jpg "Image title")

Create clickable links and embed images using bracket and parenthesis syntax.

Code Blocks
```javascript function hello() { console.log("Hello, World!"); } ``` ```python def hello(): print("Hello, World!") ```

Use triple backticks with language specification for syntax-highlighted code blocks.

Tables
| Header 1 | Header 2 | Header 3 | |----------|----------|----------| | Row 1 | Data | Data | | Row 2 | Data | Data |

Create tables using pipes (|) to separate columns and dashes to separate headers.

Blockquotes
> This is a blockquote > It can span multiple lines > > > Nested blockquotes are also possible

Use greater-than symbols (>) to create blockquotes and indented text.

Advanced Techniques

GitHub Flavored Markdown (GFM)
  • Task Lists: Use - [ ] for unchecked and - [x] for checked items
  • Emoji: Use :emoji_name: syntax like :smile: or :rocket:
  • Mentions: Use @username to mention users
  • Autolinks: URLs automatically become clickable

Best Practices

  • Use consistent heading structure (don't skip levels)
  • Add blank lines around headers and paragraphs for readability
  • Use descriptive alt text for images
  • Keep line lengths reasonable (80-120 characters)
  • Use relative links for internal documents

Ready to Practice?

Try out all these examples in MarkGenie's live editor!