home

Markdown Cheatsheet and Editing Guide

Markdown is a lightweight markup language that is widely used for creating formatted documents, web content, and documentation. It allows you to format text using simple and intuitive syntax. This cheatsheet and editing guide provides an extensive list of Markdown elements and their usage, along with examples and code blocks to illustrate each element.

Table of Contents

  1. Headers
  2. Text Formatting
  3. Lists
  4. Links
  5. Images
  6. Code
  7. Horizontal Lines
  8. Tables
  9. Escape Characters
  10. Blockquotes
  11. Editing Tips

Headers

Headers are used to define different levels of section headings in your document.

Example:

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

Output:

Header 1

Header 2

Header 3

Header 4

Header 5
Header 6

Text Formatting

Bold

Use double asterisks ** or double underscores __ to make text bold.

Example:

This is **bold** text.

Output:

This is bold text.

Italic

Use single asterisks * or single underscores _ to make text italic.

Example:

This is *italic* text.

Output:

This is italic text.

Strikethrough

Use double tildes ~~ to create strikethrough text.

Example:

This is ~~strikethrough~~ text.

Output:

This is strikethrough text.

Underline

Markdown doesn't have native underline support, but you can use HTML <u> tags for underlining.

Example:

This is <u>underlined</u> text.

Output:

This is underlined text.

Superscript and Subscript

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

Example:

H<sub>2</sub>O is a liquid. 2<sup>3</sup> equals 8.

Output:

H2O is a liquid. 23 equals 8.


Lists

Ordered Lists

Create ordered lists using numbers followed by a period.

Example:

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

Output:

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

Unordered Lists

Create unordered lists using asterisks *, plus +, or hyphens -.

Example:

* Item 1
* Item 2
* Item 3

Output:

  • Item 1
  • Item 2
  • Item 3

Nested Lists

You can nest lists by indenting them with spaces or tabs.

Example:

* Item 1
    * Subitem 1
    * Subitem 2
* Item 2
    * Subitem 3

Output:

  • Item 1
    • Subitem 1
    • Subitem 2
  • Item 2
    • Subitem 3

Create links using square brackets [] for the link text and parentheses () for the URL.

Example:

[Google](https://www.google.com)

Output:

Google

Define reference links at the end of the document and use them throughout the text.

Example:

[Google][1]

[1]: https://www.google.com

Output:

Google

You can link header on a page by hash notation. The browser will scroll to the correct section on load.

Example:

[tableofcontents](#tableofcontents)

Output:

tableofcontents


Images

Embed images using an exclamation mark !, followed by square brackets [] for the alt text, and parentheses () for the image URL.

Example:

![Markdown Logo](https://commonmark.org/help/images/favicon.png)

Output:

Markdown Logo

Note: You can also specify the size of the final image either in pixels or in percentage of the screen resolution. You just need to add =10%x* or =100pxx* at the end of round brackets.

Example:

![Markdown Logo 10%](https://commonmark.org/help/images/favicon.png =10%x*)

Markdown Logo


Code

Inline Code

Enclose inline code within backticks `.

Example:

This is `inline code`.

Output:

This is inline code.

Code Blocks

Create code blocks by indenting with four spaces or by using triple backticks for fenced code blocks.

Example:

```
function hello() {
    console.log("Hello, world!");
}
‎ ```

Output:

function hello() {
    console.log("Hello, world!");
}

Horizontal Lines

Create horizontal lines with three or more hyphens ---, asterisks ***, or underscores ___.

Example:

---

Output:


Tables

Create tables using pipes | to separate columns and hyphens for headers.

Example:

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

Output:

Header 1 Header 2
Row 1 Data 1
Row 2 Data 2

Escape Characters

To display characters that have special meaning in Markdown, escape them with a backslash \.

Example:

\*This is not italic\*

Output:

*This is not italic*


Blockquotes

Use the > symbol to create blockquotes.

Example:

> This is a blockquote. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Turpis egestas maecenas pharetra convallis posuere morbi leo. Scelerisque felis imperdiet proin fermentum. Sit amet volutpat consequat mauris. Vitae nunc sed velit dignissim sodales ut eu sem integer. Orci phasellus egestas tellus rutrum tellus pellentesque eu tincidunt tortor. Dictum varius duis at consectetur lorem donec massa. Mattis pellentesque id nibh tortor. Vulputate enim nulla aliquet porttitor lacus. Mi eget mauris pharetra et. Quam elementum pulvinar etiam non quam lacus suspendisse faucibus.

Output:

This is a blockquote. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Turpis egestas maecenas pharetra convallis posuere morbi leo. Scelerisque felis imperdiet proin fermentum. Sit amet volutpat consequat mauris. Vitae nunc sed velit dignissim sodales ut eu sem integer. Orci phasellus egestas tellus rutrum tellus pellentesque eu tincidunt tortor. Dictum varius duis at consectetur lorem donec massa. Mattis pellentesque id nibh tortor. Vulputate enim nulla aliquet porttitor lacus. Mi eget mauris pharetra et. Quam elementum pulvinar etiam non quam lacus suspendisse faucibus.


Editing Tips

  1. Preview: This wiki has a preview mode to see how your document will look when rendered.

  2. Consistency: Maintain consistent formatting and indentation for better readability.

  3. Practice: The more you practice, the more comfortable you'll become with Markdown.

  4. Use Reference Links: For long URLs or repeated links, reference links can make your Markdown cleaner.

Now that you have a comprehensive Markdown cheatsheet, you can start creating well-formatted documents and content with ease.

Feel free to experiment and explore Markdown's versatility!

This Markdown cheatsheet and editing guide covers a wide range of elements and techniques to help you create formatted and well-structured documents. Use it as a reference whenever you're working with Markdown, and don't hesitate to explore more advanced features and extensions based on your specific needs. Happy Markdown editing!