H1 - Main Title

Basic Syntax

Markdown is a lightweight markup language for creating formatted text. Below are examples with common syntax.


Heading

Use # for headings. Add more # for smaller headings.

# H1 - Main Title

## H2 - Section Title

### H3 - Subsection Title

Bold

Use double asterisks (**) for bold text.

Example:

**This is bold text**

Result:

This is bold text


Italic

Use single asterisks (*) or underscores (_) for italic text.

Example:

_This is italic text_

Result:
This is italic text


Blockquote

Use the greater-than symbol (>).

Example:

> This is a blockquote.

Result:

This is a blockquote.


Ordered List

Use numbers followed by a period.

Example:

1. First item
2. Second item
3. Third item

Result:

  1. First item
  2. Second item
  3. Third item

Unordered List

Use -, +, or *.

Example:

- First item
- Second item
- Third item

Result:

  • First item
  • Second item
  • Third item

Code

Wrap inline code with backticks (`), or use triple backticks for code blocks.

Example:

Inline code: `print("Hello, World!")`

Result:
Inline code: print("Hello, World!")

Code block:

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

Horizontal Rule

Use three dashes (---), underscores (___), or asterisks (***).

Example:

---
---

---

Use [text](URL).

Example:

[Visit GitHub](https://github.com/)

Result:

Visit GitHub


Image

Use ![alt text](image URL).

Example:

![Markdown Logo](https://www.markdownguide.org/assets/images/tux.png)

Result:

Markdown Logo


Table

Use pipes (|) and dashes (-) to create tables.

Example:

| Syntax    | Description |
| --------- | ----------- |
| Header    | Title       |
| Paragraph | Text        |

Result:

Syntax Description
Header Title
Paragraph Text

Footnote

Add references using [^1].

Example:

This is a footnote example.[^1]

[^1]: Footnote content goes here.

Result:
This is a footnote example.[^1]

[^1]: Footnote content goes here.


Strikethrough

Use ~~ to strike through text.

Example:

~~This text is crossed out.~~

Result:

This text is crossed out.


Task List

Use - [ ] for incomplete tasks and - [x] for completed tasks.

Example:

- [x] Complete homework
- [ ] Learn Markdown
- [ ] Submit the project

Result:

  • Complete homework
  • Learn Markdown
  • Submit the project

Emoji

Use text codes for emojis.

Example:

I love programming! : heart_eyes:

Result:

I love programming! 😍


Subscript and Superscript

Use <sub> for subscript and <sup> for superscript.

Example:

H<sub>2</sub>O (Water)
E = mc<sup>2</sup> (Einstein's equation)

Result:
H2O (Water)
E = mc2 (Einstein's equation)