Markdown Syntax Guide

Complete Markdown syntax tutorial from basics to advanced features

What is Markdown?

Markdown is a lightweight markup language created by John Gruber in 2004. It uses simple plain text formatting syntax that can be easily converted to HTML and other formats. Markdown is widely used for technical documentation, blog writing, README files, and more.

Basic Syntax

1. Headers

Use # symbols to create headers. The number of # symbols indicates the header level:

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

2. Text Formatting

Markdown syntax supports various text formats:

**Bold text**
*Italic text*
***Bold and italic***
~~Strikethrough text~~

3. Lists

Unordered lists:

- Item 1
- Item 2
  - Sub-item 2.1
  - Sub-item 2.2
- Item 3

Ordered lists:

1. First item
2. Second item
3. Third item

4. Links and Images

Links:

[Link text](https://example.com)
[Link with title](https://example.com "Link title")

Images:

![Image alt text](image-url.jpg)
![Image with title](image-url.jpg "Image title")

5. Blockquotes

> This is a blockquote
> It can span multiple lines
>
> > Nested blockquote

6. Code

Inline code:

Use `code` for inline code

Code blocks:

function hello() {
  console.log("Hello, World!");
}

Extended Syntax

7. Markdown Tables

Markdown tables are one of the most commonly used extended features:

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Content 1 | Content 2 | Content 3 |
| Content 4 | Content 5 | Content 6 |

Alignment:

| Left Align | Center Align | Right Align |
|:-----------|:------------:|------------:|
| Left | Center | Right |

8. Task Lists (Markdown Checklist)

Markdown task lists are perfect for to-do items:

- [x] Completed task
- [ ] Incomplete task
- [ ] Another to-do
  - [x] Sub-task 1
  - [ ] Sub-task 2

9. Footnotes

Here's a sentence with a footnote[^1].

[^1]: This is the footnote content.

10. Horizontal Rules

---
***
___

11. Escaping Characters

Use backslash \ to escape special characters:

\*Not italic\*
\# Not a header

GitHub Flavored Markdown (GFM)

Automatic Links

URLs and email addresses automatically convert to links:

https://example.com
user@example.com

Strikethrough

~~Deleted text~~

Emoji

:smile: :heart: :thumbsup:

Best Practices

1. Document Structure

  • Use clear heading hierarchy, don't skip levels
  • Use H1 for document title, typically only one
  • Organize information with lists and tables

2. Code Blocks

  • Always specify language for proper syntax highlighting
  • Use inline code for short snippets or commands
  • Use code blocks for multi-line code or complete examples

3. Markdown Tables

  • Keep tables simple, avoid too many columns
  • Use alignment to improve readability
  • Consider HTML or other formats for complex tables

Common Markdown Editors

  • Online Editors: Markdown Online (this site), Dillinger, StackEdit
  • Desktop Editors: Typora, Mark Text, Visual Studio Code
  • Mobile: iA Writer, Bear (iOS), Markor (Android)

Markdown Use Cases

  • Technical Documentation: API docs, user manuals, specifications
  • Blog Writing: Static blogs (Jekyll, Hugo, Hexo)
  • GitHub/GitLab: README.md, Issues, Pull Requests, Wikis
  • Note-taking Apps: Notion, Obsidian, Joplin
  • Forums: Reddit, Stack Overflow, Discord
  • Presentations: Reveal.js, Marp

Learning Resources

Start Using Markdown Now

Now that you understand Markdown syntax, you can start creating with our Markdown Online Editor. It supports real-time preview, Markdown to PDF, Markdown to Word, and more features to help you efficiently complete your documentation.