LoginSignup
1
6

More than 3 years have passed since last update.

Markdown記法 チートシート

Last updated at Posted at 2018-06-01

はじめに

Markdown記法のチートシートです。
なんとなく使っていたので勉強がてらまとめました。

記法一覧

Type Example
HEADERS # This is an H1
BLOCKQUOTES > This is a blockquote.
LISTS * Red
* Green
ORDERED LISTS 1. Red
2. Green
HORIZONTAL RULES ***
ITALIC *single asterisks*
BOLD FACE **double asterisks**
STRIKETHROUGH ~~double asterisks~~
CODE Use the `printf()` function.
CODE BLOCKS ```text
This is a code block.
```
LINKS [This link](http://example.net/) has no title attribute.
IMAGES ![Alt text](/path/to/img.jpg "Optional title")
BACKSLASH ESCAPES \*literal asterisks\*
TABLES | | HEADER |
|:-:|--------|
| 1 | |
EMOJI :+1:
TASK LSITS - [x] this is a complete item
- [ ] this is an incomplete item

HEADERS

# This is an H1

## This is an H2

###### This is an H6
  • Result

    This is an H1

    This is an H2

    This is an H6

BLOCKQUOTES

> This is a blockquote.
>
> > This is nested blockquote.
>
> Back to the first level.
  • Result

    This is a blockquote.

    This is nested blockquote.

    Back to the first level.

LISTS

* Color
    * Red
    * Green
    * Blue

        > Blue is one of the three primary colours of pigments in painting and traditional colour theory, as well as in the RGB colour model.  
        > It lies between violet and green on the spectrum of visible light.
  • Result

    • Color

      • Red
      • Green
      • Blue

        Blue is one of the three primary colours of pigments in painting and traditional colour theory, as well as in the RGB colour model.

        It lies between violet and green on the spectrum of visible light.

  • Tips

    • インデントを下げる場合はスペース4つ
    • 同じレベルに要素を追加したいときは更にスペース4つ

ORDERED LISTS

1. Red
2. Green
3. Blue
  • Result
    1. Red
    2. Green
    3. Blue

HORIZONTAL RULES

***
  • Result


ITALIC

*single asterisks*
  • Result

    single asterisks

BOLD FACE

**double asterisks**
  • Result

    double asterisks

  • Tips

    • 3つでBOLD+ITALIC
***triple asterisks***
  • Result

    triple asterisks

STRIKETHROUGH

~~double tilde~~
  • Result

    double tilde

CODE

Use the `printf()` function.
  • Result

    Use the printf() function.

CODE BLOCKS

    ```java
    // This is a code block.
    public void main(String[] args) {
        System.out.println("Hello world.");
    }
    ```
  • Result
// This is a code block.
public void main(String[] args) {
    System.out.println("Hello world.");
}
  • Tips

    • コードブロック内にバッククォートを表示したいときは、より多い数のバッククォートでくくる
    • それでもできない場合はインデントを下げる
より多い数のバッククォートでくくる
    ````
    ```java
    // This is a code block.
    public void main(String[] args) {
        System.out.println("Hello world.");
    }
    ```
    ````
インデントを下げる
    ```
        ```java
        // This is a code block.
        public void main(String[] args) {
            System.out.println("Hello world.");
        }
        ```
    ```
  • Result
    ```java
    // This is a code block.
    public void main(String[] args) {
        System.out.println("Hello world.");
    }
    ```

LINKS

[This link](http://example.net/) has no title attribute.
  • Result

    This link has no title attribute.

  • Tips

    • 参照リンクできる

          This is reference-style link to [Google][1].  
          This is reference-style link to [Yahoo][2].  
          This is reference-style link to [Bing][3].
      
          [1]: https://www.google.co.jp/  "Google"
          [2]: https://www.yahoo.co.jp/   "Yahoo"
          [3]: https://www.bing.com/      "Bing"
      
  • Result

    This is reference-style link to Google.

    This is reference-style link to Yahoo.

    This is reference-style link to Bing.

IMAGES

![Alt text](/path/to/img.jpg "Optional title")
  • Result

    Alt text

  • Tips

    • LINKS同様参照リンクできる

BACKSLASH ESCAPES

\*literal asterisks\*
  • Result

    *literal asterisks*

TABLES

|   | HEADER |
|:-:|--------|
| 1 |        |
  • Result

    HEADER
    1
  • Tips

    • 右寄せ |--:|--------|
    • 左寄せ |:--|--------|
    • 中央寄せ |:-:|--------|

EMOJI

:+1:
  • Result

    :thumbsup:

TASK LISTS

- [x] this is a complete item
- [ ] this is an incomplete item
  • Result

    • this is a complete item
    • this is an incomplete item

参考

Daring Fireball - Markdown
Mastering Markdown · GitHub Guides

1
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
6