- Published on
Complete Markdown Guide for Writers and Developers
- Authors
Shantnu Sharma
π Introduction
Markdown is a lightweight markup language that allows you to style text with plain syntax. It is widely used in blogging platforms, documentation, and code editors due to its simplicity and portability.
This guide serves as a comprehensive reference for Markdown syntax β from headers and emphasis to code blocks and task lists. It uses GitHub Flavored Markdown (GFM), enhanced with mdx-prism
for syntax highlighting, and is compatible with systems like next-mdx-remote
and unified
.
π What is Markdown?
Markdown lets you write rich text using a plain text editor. You style the text with characters like #
, *
, or []()
β which are then parsed into HTML or rendered as formatted content on platforms like GitHub or your blog.
It's easy to learn, fast to write, and portable across platforms.
π§ Syntax Guide
Hereβs how to use common Markdown formatting elements, with explanations and examples for each.
π Headers
Use #
followed by a space to define headings:
# H1 (Main title)
## H2 (Section title)
### H3 (Subsection)
#### H4 (Smaller heading)
H1 (Main title)
H2 (Section title)
H3 (Subsection)
H4 (Smaller heading)
β¨ Emphasis
Format text with italics, bold, or a combination of both:
_Italic_ or _Italic_
**Bold**
_You **can** combine them_
Italic or Italic
Bold
You can combine them
π’ Lists
Unordered List
Use -
, +
, or *
:
- Item 1
- Item 2
- Subitem 2a
- Subitem 2b
- Item 1
- Item 2
- Subitem 2a
- Subitem 2b
Ordered List
Numbered automatically:
1. First
2. Second
3. Third
1. Subitem
- First
- Second
- Third
- Subitem
πΌοΈ Images
Embed images using 
syntax:

π Links
Automatic or custom text links:
http://github.com
[GitHub](http://github.com)
π¬ Blockquotes
Prefix a line with >
:
> This is a blockquote.
> It can span multiple lines.
This is a blockquote.
It can span multiple lines.
Inline code
Use backticks to style inline code:
`<div>` is a block-level element.
<div>
is a block-level element.
π Syntax Highlighting
For code blocks with highlighting:
function fancyAlert(arg) {
if (arg) {
$.facebox({ div: '#foo' })
}
}
function fancyAlert(arg) {
if (arg) {
$.facebox({ div: '#foo' })
}
}
π¦Ά Footnotes
Markdown can support footnotes like so:
Here's a statement with a footnote.[^1]
[^1]: This is the footnote text.
Here's a statement with a footnote.1
β Task Lists
Create checkboxes using list syntax:
- [x] Write content
- [ ] Review edits
- [ ] Publish post
- Write content
- Review edits
- Publish post
π Tables
Tables use pipes |
and hyphens -
to define structure:
| Syntax | Description |
| --------- | ----------- |
| Header | Title |
| Paragraph | Text |
Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
β Strikethrough
Wrap text in double tildes ~~
:
~~This text is crossed out~~
This text is crossed out
π§ͺ Advanced: MDX and Syntax Enhancers
If you're using MDX (Markdown with JSX), you can embed React components directly into Markdown. Combine this with tools like mdx-prism
, remark-gfm
, and rehype-slug
to supercharge your content with syntax highlighting, auto-linked headings, and more.
π Final Notes
Markdown is an incredibly effective and efficient way to write for the web. Itβs readable, portable, and integrates perfectly into modern toolchains. Whether youβre documenting, blogging, or building with Next.js β mastering Markdown is a must.
Feel free to copy, bookmark, or share this guide. Happy writing!
Footnotes
This is the footnote text. β©