Skip to main content

Markdown Cheat Sheet

This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for markdown features

Basic Syntax

All Markdown applications support these elements.

Heading

H1

H2

H3

Bold

bold text

Italic

italicized text or italicized text

Blockquote

Easy to maintain open source documentation websites.

— Docusaurus

Details element example

Toggle me!
This is the detailed content

Nested toggle! Some surprise inside...
😲😲😲😲😲

Ordered List

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

Unordered List

  • First item
  • Second item
  • Third item

Code

code

Horizontal Rule


Markdown Guide

Image

alt text

Extended Syntax

These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements.

Table

SyntaxDescription
HeaderTitle
ParagraphText

Fenced Code Block

{
"firstName": "John",
"lastName": "Smith",
"age": 25
}

With code highlighting

src/components/HelloDocusaurus.js
function HelloDocusaurus() {
return (
<h1>Hello, Docusaurus!</h1>
)
}

Footnote

Here's a sentence with a footnote. 1

Custom Heading ID

My Great Heading

Strikethrough

The world is flat.

Task List

  • Write the press release
  • Update the website
  • Contact the media

Emoji

That is so funny! 😂

(See also Copying and Pasting Emoji)

My tip

Use this awesome feature option

Take care

This action is dangerous

MDX and React Components

MDX can make your documentation more interactive and allows using any React components inside Markdown:

export const Highlight = ({children, color}) => (
<span
style={{
backgroundColor: color,
borderRadius: '20px',
color: '#fff',
padding: '10px',
cursor: 'pointer',
}}
onClick={() => {
alert(`You clicked the color ${color} with label ${children}`)
}}>
{children}
</span>
);

This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !

This is <Highlight color="#1877F2">Facebook blue</Highlight> !

This is Docusaurus green !

This is Facebook blue !


  1. This is the footnote.