Advertisement
❮ Previous: Markdown HTML Home ❯

Markdown Cheat Sheet

Here is a quick-reference cheat sheet for standard Markdown syntax.

Basic Formatting

Element Markdown Syntax Result
Bold **text** or __text__ text
Italic *text* or _text_ text
Bold & Italic ***text*** text
Strikethrough ~~text~~ text
Inline Code code code

Headings

Use # for headings. The number of hashes dictates the heading level (1-6).

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

Lists

Unordered List

Use -, *, or + for bullet points. Add spaces to indent for nested lists.

- Item 1
- Item 2
  - Sub-item A
  - Sub-item B

Ordered List

Use numbers followed by periods.

1. First item
2. Second item
   1. Nested first item

Task List (GitHub Flavored)

- [x] Completed task
- [ ] Incomplete task

Links and Images

Type Syntax Example
Link [Link Text](URL) [Google](https://google.com)
Image ![Alt Text](Image URL) ![Logo](logo.png)
Image with Link [![Alt](URL)](Link) [![Alt](logo.png)](https://google.com)

Blockquotes and Dividers

Blockquotes

Use > to create a blockquote.

> This is a blockquote.
>> This is a nested blockquote.

Horizontal Rules

Use three or more dashes, asterisks, or underscores on a new line to create a divider.

---
***
___

Code Blocks

Use three backticks (`````) to create a code block. You can specify the language right after the first set of backticks for syntax highlighting.

```python
def hello_world():
    print("Hello, Markdown!")

Tables

Use pipes (|) to separate columns and hyphens (-) to create the header row. Use colons (:) in the header row to align text.

| Left Align | Center Align | Right Align |
| :--- | :---: | ---: |
| Text | Text | Text |
❮ Previous: Markdown HTML Home ❯
Advertisement