Skip to content

Markdown Commands

Overview

Markdown is a lightweight markup language used for formatting text. It allows you to create formatted documents using plain text. This document covers basic Markdown commands and their usage.

Headers

# Header 1

Creates a level 1 header (largest).

# Header 1

Example

# This is a level 1 header

## Header 2

Creates a level 2 header.

## Header 2

Example

## This is a level 2 header

### Header 3

Creates a level 3 header.

### Header 3

Example

### This is a level 3 header

Emphasis

*italic* or _italic_

Formats text in italics.

*italic* or _italic_

Example

*This text is italicized*

**bold** or __bold__

Formats text in bold.

**bold** or __bold__

Example

**This text is bold**

Lists

Unordered List

Creates an unordered list with bullet points.

- Item 1
- Item 2
- Item 3

Example

- Apples
- Oranges
- Bananas

Ordered List

Creates an ordered list with numbered items.

1. Item 1
2. Item 2
3. Item 3

Example

1. First step
2. Second step
3. Third step

Creates a hyperlink.

[Link Text](URL)

Example

[OpenAI](https://www.openai.com)

Images

![Alt Text](URL)

Inserts an image.

![Alt Text](URL)

Example

![OpenAI Logo](https://www.openai.com/favicon.ico)

Blockquotes

> Blockquote

Formats text as a blockquote.

> Blockquote

Example

> This is a blockquote.

Code

Inline Code

Creates inline code with backticks.

`inline code`

Example

Use the `print()` function to display text.

Code Block

Creates a code block with triple backticks.


Code block


Example

def hello_world():
    print("Hello, World!")

Horizontal Rule

--- or *** or ___

Creates a horizontal line.

---

Example

---

Tables

| Header 1 | Header 2 |

Creates a table.

| Header 1 | Header 2 |
|----------|----------|
| Row 1    | Data 1   |
| Row 2    | Data 2   |

Example

| Name  | Age |
|-------|-----|
| John  | 30  |
| Alice | 25  |

Summary

Markdown provides a simple way to format text documents with headers, emphasis, lists, links, images, blockquotes, code, horizontal rules, and tables. Using these commands, you can create well-structured and readable documents. For more detailed information on Markdown syntax, refer to the Markdown Guide.