Markdown Complete Guide: Syntax, Tips & Best Practices
Β· 12 min read
What Is Markdown?
Markdown is a lightweight markup language created by John Gruber in 2004. It lets you write formatted text using plain text syntax that is easy to read and write. Instead of clicking buttons in a word processor or writing HTML tags, you use simple characters like # for headings, ** for bold, and - for lists.
Markdown has become the standard for technical writing, documentation, README files, blog posts, and note-taking. Platforms like GitHub, Reddit, Stack Overflow, Discord, and Notion all support Markdown natively.
The beauty of Markdown is that the source text remains readable even without rendering. A Markdown document looks clean in any text editor, unlike HTML which is cluttered with tags.
Why Use Markdown?
- Speed β Writing
**bold**is faster than<strong>bold</strong> - Portability β Plain text files work everywhere, on every OS and editor
- Version control β Git diffs are clean and meaningful with Markdown
- Focus β No formatting toolbar distractions; just write
- Conversion β Easily converts to HTML, PDF, DOCX, and other formats
Headings
Headings use the # symbol. The number of hashes determines the heading level (1-6):
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Always put a space after the # symbol. Most Markdown processors require it. Use heading levels sequentially β don't skip from H1 to H3. This matters for accessibility and SEO.
Text Formatting
| Format | Syntax | Result |
|---|---|---|
| Bold | **bold** | bold |
| Italic | *italic* | italic |
| Bold + Italic | ***both*** | both |
| Strikethrough | ~~deleted~~ | |
| Inline code | `code` | code |
Lists
Unordered Lists
Use -, *, or + followed by a space. Nest with 2-space indent:
- First item
- Second item
- Nested item
- Third item
Ordered Lists
1. First item
2. Second item
3. Third item
Task Lists (GFM)
- [x] Completed task
- [ ] Incomplete task
Links and Images
[Link text](https://example.com)
[Link with title](https://example.com "Title")

Always include descriptive alt text for images. Use our Markdown to HTML converter to preview how your links render.
Code Blocks
Inline code uses backticks: `variable`. Fenced code blocks use triple backticks with a language identifier:
```javascript
function greet(name) {
return `Hello, ${name}!`;
}
```
Common languages: javascript, python, html, css, bash, json, sql, typescript.
Tables
| Feature | Markdown | HTML |
|-------------|----------|--------|
| Readability | High | Low |
| Speed | Fast | Slow |
Alignment: :--- left, :---: center, ---: right.
Blockquotes and Horizontal Rules
> This is a blockquote.
> > Nested blockquotes work too.
---
Extended Syntax
Footnotes
Text with a footnote.[^1]
[^1]: Footnote content.
Definition Lists
Term
: Definition of the term
HTML in Markdown
When Markdown syntax is not enough, use raw HTML. Most processors support <details>, <summary>, <kbd>, and other tags.
Markdown Flavors
| Flavor | Used By | Extra Features |
|---|---|---|
| CommonMark | Standard spec | Strict parsing rules |
| GFM | GitHub | Tables, task lists, strikethrough |
| MDX | React docs | JSX components in Markdown |
| R Markdown | RStudio | Code execution, visualization |
Best Practices
- One sentence per line β Makes diffs cleaner in version control
- Consistent heading hierarchy β Never skip levels
- Alt text on images β Required for accessibility
- Blank lines around blocks β Headings, lists, code blocks need them
- Use fenced code blocks β Clearer than indented code
- Lint your Markdown β markdownlint catches common issues
- Preview before publishing β Use TxtTool's Markdown Editor
Frequently Asked Questions
What is the difference between Markdown and HTML?
Markdown is a lightweight markup language that converts to HTML. It uses simple symbols like # for headings and ** for bold, making it faster to write than HTML tags.
Which Markdown flavor should I use?
GitHub Flavored Markdown (GFM) is the most widely supported. It adds tables, task lists, strikethrough, and autolinks to standard Markdown.
Can I use HTML inside Markdown?
Yes, most Markdown processors allow inline HTML for features Markdown does not support, like colored text or complex layouts.
How do I create a table in Markdown?
Use pipes and hyphens: | Header | followed by | --- | for separator, then | Cell | for rows. Use colons for alignment.
What apps support Markdown?
GitHub, Reddit, Stack Overflow, Discord, Slack, Notion, Obsidian, VS Code, and most documentation platforms support Markdown natively.