Markdown Cheat Sheet
This is the Markdown Cheat Sheet based on the Markdown interpreter used for macsdata.
Emphasisβ
To create bold, italic or strikethrough text use the *
, _
and ~
symbols before and after the text.
Boldβ
**Bold text example**
__Bold text example__
Bold text example
Bold text example
Italicβ
*Italic text example*
_Italic text example_
Italic text example
Italic text example
Strikethroughβ
~~Strikethrough text example~~
Strikethrough text example
Combinedβ
_Example with **combined** emphasis_
***This example text that is bold and italic***
Another text with some **bold**, some _italic_ and some ~~strikethrough~~
Example with combined emphasis
This example text that is bold and italic
Another text with some bold, some italic and some strikethrough
Headingsβ
To create headings, use the #
symbol followed by a space and the heading text. The number of #
symbols indicates the heading level, with one #
being the largest and six #
symbols being the smallest.
# Heading h1
## Heading h2
### Heading h3
#### Heading h4
##### Heading h5
###### Heading h6
Heading h1
Heading h2
Heading h3
Heading h4
Heading h5
Heading h6
Listβ
Ordered Listβ
1. First item
2. Second item
3. Third item
1. Third item a
2. Third item b
- First item
- Second item
- Third item
- Third item a
- Third item b
Unordered Listβ
* First item
* Second item
* Third item
* Third item a
* Third item b
- First item
- Second item
- Third item
- Third item a
- Third item b
- First item
- Second item
- Third item
- Third item a
- Third item b
- First item
- Second item
- Third item
- Third item a
- Third item b
Paragraphsβ
Add 4 spaces or equivalent tab to the markdown text.
* First item
* Second item
Some example text with paragraph
* Third item
- First item
- Second item
Some example text with paragraph - Third item
Highlightβ
This is some text with a `highlight` word.
This is some text with a highlight
word.
Horizontal Ruleβ
***
---
___
Linksβ
This is a [link](markdown_cs.md)
This is an external [link](https://macsdata.com)
This is a link
This is an external link
Anchor Linksβ
This is an [anchor link](#headings) to the Headings section in this document.
This is an anchor link to the Headings section in this document.
Reference Styleβ
This is a [link][1]
This is an external [link][external]
... end of document:
[1]: markdown_cs.md
[external]: https://macsdata.com
This is a link
This is an external link
Imagesβ
![img alt](/img/logoMD.png)
Blockquotesβ
> This is a text in a blockquote
>
> Example
This is a text in a blockquote
Example
Nestedβ
> This is a text in a blockquote
>
> Example
>> This is an additional one nested
>> Another example
This is a text in a blockquote
Example
This is an additional one nested
Another example
Tablesβ
| Header1 | Header2 |
| ------- | ------- |
| test | test |
| test | test |
Header1 | Header2 |
---|---|
test | test |
test | test |
| Left-aligned | Center-aligned | Right-aligned |
| :--- | :---: | ---: |
| test | test | test |
| test | test | test |
Left-aligned | Center-aligned | Right-aligned |
---|---|---|
test | test | test |
test | test | test |
Footnotesβ
This is some text with a footnote. [^1]
[^1]: This is the footnote.
This is some text with a footnote. 1
Details elementβ
<details>
<summary>Toggle me!</summary>
<div>
<div>This is the detailed content</div>
</div>
</details>
Toggle me!
Nestedβ
<details>
<summary>Toggle me!</summary>
<div>
<div>This is the detailed content</div>
<br/>
<details>
<summary>
Toggle me again!
</summary>
<div>
This is the text in the nested toggle
</div>
</details>
</div>
</details>
Toggle me!
Toggle me again!
This is the text in the nested toggle
Commentβ
[//]: # (This comment is not visible in the final html file)
<!---
this is a comment
-->
Tabsβ
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs>
<TabItem value="tab1" label="Tab1" default>
This is the text in tab1
</TabItem>
<TabItem value="tab2" label="Tab2">
This is the text in tab2
</TabItem>
<TabItem value="tab3" label="Tab3">
This is the text in tab3
</TabItem>
</Tabs>
- Tab1
- Tab2
- Tab3
This is the text in tab1
This is the text in tab2
This is the text in tab3
Codeβ
```bash title="Custom Title" {1,5-6,9} showLineNumbers
#!/bin/bash
var1='example'
echo "This is a simple shell script"
echo "To showcase the code functionality"
for i in 1 2 3 4; do
echo "Line number: ${i}"
done
```
#!/bin/bash
var1='example'
echo "This is a simple shell script"
echo "To showcase the code functionality"
for i in 1 2 3 4; do
echo "Line number: ${i}"
done
Task Listβ
- [x] The first task item
- [ ] The second task item
- [ ] The third task item
- The first task item
- The second task item
- The third task item
Admonitionsβ
:::note
Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).
:::
Some content with Markdown syntax
. Link to this document
.
:::tip
Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).
:::
Some content with Markdown syntax
. Link to this document
.
:::info
Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).
:::
Some content with Markdown syntax
. Link to this document
.
:::caution[]
Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).
:::
Some content with Markdown syntax
. Link to this document
.
:::danger[]
Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).
:::
Some content with Markdown syntax
. Link to this document
.
Custom Headerβ
To use a custom header just add the header text after the admonition category definition.
:::info[CUSTOM HEADER]
This is an info box with a custom header
:::
This is an info box with a custom header
Emojiβ
:+1: :flushed: :cop: :red_car: :100: :arrow_up:
π π³ :cop: π π― β¬οΈ
Backslash Escapeβ
Overview of characters that can be escaped by using a backslash \
.
Character | Markdown | Output |
---|---|---|
backslash | \\ | \ |
backtick | \` | ` |
underscore | \_ | _ |
asterisk | \* | * |
curly braces | \{\} | {} |
square brackets | \[\] | [] |
angle brackets | \<\> | <> |
parentheses | \(\) | () |
pound sign | \# | # |
plus sign | \+ | + |
minus sign (hyphen) | \- | - |
exclamation mark | \! | ! |
dot | \. | . |
Footnotesβ
-
This is the footnote. β©