Skip to content

markdown

A quick reference for Markdown syntax, covering text formatting, lists, links, images and more.

Text Formatting

Basic syntax for formatting text in Markdown.

Headings

Make text bold.

# Heading 1
## Heading 2
### Heading 3

Bold

Make text bold.

**bold** or __bold__
Use double asterisks or underscores.

Italic

Make text italic.

*italic* or _italic_
Use single asterisks or underscores.

Strikethrough

Strike through text.

~~strikethrough~~
Wrap text with double tildes.

Inline Code

Format inline code.

`inline code`
Wrap code with backticks.

Highlight

Emphasize important text by highlighting it.

I need to highlight these ==very important words==.
Wrap text with double equal signs.

Subscript

Format text as subscript.

H~2~O
Wrap text with tilde.

Superscript

Format text as superscript.

X^2^
Wrap text with caret.

Lists

Create ordered and unordered lists.

Unordered List

Create a bullet-point list.

- Item 1
- Item 2
Use `-` for bullet points.

Ordered List

Create a numbered list.

1. First item
2. Second item
Use sequential numbers.

Task List

Define tasks with checkboxes.

- [x] Completed task
- [ ] Incomplete task
Use `- [ ]` for unchecked and `- [x]` for checked items.

Links and Images

Syntax for adding links and images.

Link

Create a hyperlink.

[Example](https://example.com)
Use square brackets for text and parentheses for URL.

Image

Embed an image.

![Alt text](https://example.com/image.jpg)
Use exclamation mark before square brackets.

Image with a link

Embed an image that links to a URL.

[![Alt text](https://example.com/image.jpg)](https://example.com)
Wrap the image in brackets, using parentheses for the link URL.

Block Elements

Structural formatting for text and content.

Blockquote

Format text as a block quote.

> This is a blockquote.
Use `>` at the beginning of a line.

Horizontal Rule

Insert a horizontal line.

---
Use three hyphens.

Fenced Code Block

Create a block of code.

```javascript
console.log("Hello, world!");
```
Use triple backticks and specify language.

Tables

Create tables in Markdown.

Table

Define a table structure.

| Row 1, Column 1 | Row 1, Column 2 |
| Row 2, Column 1 | Row 2, Column 2 |
| Row 3, Column 1 | Row 3, Column 2 |
Use pipes `|` to separate columns.

Header Row

Define a header row for the table.

| Header 1 | Header 2 |
|----------|----------|
| Data 1 | Data 2 |
Use dashes `-` to create the header row.

Left Alignment

Align table cells to the left.

| Left-Aligned |
|:------------|
| Data 1 |
| Data 2 |
Use `:` to align cells to the left.

Center Alignment

Align table cells to the center.

| Center-Aligned |
|:--------------:|
| Data 1 |
| Data 2 |
Use `:` on both sides of the dashes to center-align cells.

Right Alignment

Align table cells to the right.

| Right-Aligned |
|--------------:|
| Data 1 |
| Data 2 |
Use `:` to align cells to the right.