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!
Nested toggle! Some surprise inside...
Ordered List
- First item
- Second item
- Third item
Unordered List
- First item
- Second item
- Third item
Code
code
Horizontal Rule
Link
Image
Extended Syntax
These elements extend the basic syntax by adding additional features. Not all Markdown applications support these elements.
Table
Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
Fenced Code Block
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
With code highlighting
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)
Use this awesome feature option
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 !
- This is the footnote.↩