Skip to main content

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.

# Example: Heading h1 tag

## Example: Heading h2 tag

### Example: Heading h3 tag

#### Example: Heading h4 tag

##### Example: Heading h5 tag

###### Example: Heading h6 tag

Example: Heading h1 tag

Example: Heading h2 tag

Example: Heading h3 tag

Example: Heading h4 tag

Example: Heading h5 tag
Example: Heading h6 tag

List

Ordered List

1. First item
2. Second item
3. Third item
1. Third item a
2. Third item b
  1. First item
  2. Second item
  3. Third item
    1. Third item a
    2. 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

***
---
___



This is a [link](markdown_cs.md)
This is an external [link](https://macsdata.com)

This is a link
This is an external link

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.

Images

![img alt](/img/logoMD.png)

img alt

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 |
Header1Header2
testtest
testtest
| Left-aligned | Center-aligned | Right-aligned |
| :--- | :---: | ---: |
| test | test | test |
| test | test | test |
Left-alignedCenter-alignedRight-aligned
testtesttest
testtesttest

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!
This is the detailed content

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!
This is the detailed content

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>
This is the text in tab1

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
```
Custom Title
#!/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`](#).

:::
note

Some content with Markdown syntax. Link to this document.

:::tip

Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).

:::
tip

Some content with Markdown syntax. Link to this document.

:::info

Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).

:::
info

Some content with Markdown syntax. Link to this document.

:::caution 

Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).

:::
caution

Some content with Markdown syntax. Link to this document.

:::danger 

Some **content** with _Markdown_ `syntax`. Link to [this `document`](#).

:::
danger

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

:::
CUSTOM HEADER

This is an info box with a custom header

Emoji

:+1: :flushed: :cop: :red_car: :100: :arrow_up:

👍 😳 👮‍♂️ 🚗 💯 ⬆️

Backslash Escape

Overview of characters that can be escaped by using a backslash \.

CharacterMarkdownOutput
backslash\\\
backtick\``
underscore\__
asterisk\**
curly braces\{\}{}
square brackets\[\][]
angle brackets<\><>
parentheses\(\)()
pound sign\##
plus sign\++
minus sign (hyphen)\--
exclamation mark\!!
dot\..

  1. This is the footnote.