[Markdown] 작성 기본문법

J-Jun Shim·2021년 9월 13일
1

Docs

목록 보기
1/1

Markdown

It’s a plain text format for writing structured documents, based on formatting conventions from email and usenet.


Tutorial

Markdown is a simple way to format text that looks great on any device. It doesn’t do anything fancy like change the font size, color, or type — just the essentials, using keyboard symbols you already know.


Heading

Markdown은 제목부터 시작된다. Heading을 의미하는 # 문자 뒤 1번의 공백 후 제목을 작성한다. Heading 요소는 상하 공백의 줄을 요구한다.

Heading 1

H1

# H1

H1
=

Heading 2

H2

## H2

H2
-

...

Heading 6

H6
###### H6

Text

문단과 줄바꿈은 별도의 문자요소없이 이루어진다.

Paragraphs

I really like using Markdown.

I think I'll use it to format all of my documents from now on.

I really like using Markdown.

I think I'll use it to format all of my documents from now on.

Line Breaks

This is the first line.
And this is the second line.

This is the first line.  
And this is the second line.

Emphasis

강조하는 부분은 글 앞뒤에 * 혹은 _로 가능하지만 호환성을 이유로 *을 사용하는 것을 권장하고 있다.

Bold

I just love bold text.

I just love **bold text**.

I just love __bold text__.

Italic

Italicized text is the cat's meow.

Italicized text is the *cat's meow*.

Italicized text is the _cat's meow_.

Bold and Italic

This text is really important.

This text is ***really important***.

This text is ___really important___.

This text is __*really important*__.

This text is **_really important_**.

Blockquote

인용 속에서 Markdown의 다른 요소 모두 사용 가능하다.

The quarterly results look great!

Dorothy followed her through many of the beautiful rooms in her castle.

The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

> #### The quarterly results look great!
>
> Dorothy followed her through many of the beautiful rooms in her castle.
>> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

List

비순차 목록과 순차 목록이 있다. 목록을 의미하는 * 혹은 1.문자 뒤 1번의 공백 후 글을 작성한다.

Unordered list

비순차 목록 안의 목록은 다음줄의 2번의 공백 후 작성한다.

  • List
    • List in List
  • List
  • List
* List
  * List in List
* List
* List
- List
- List
- List
+ List
+ List
+ List

Ordered list

순차목록 안의 목록은 다음줄의 3번의 공백 후 작성한다.

  1. One
    1. One in One
  2. Two
    • List
  3. Three
1. One
   1. One in One
1. Two
   - List
1. Three
1. One
2. Two
3. Three
2. One
1. Two
3. Three
1) One
2) Two
3) Three

마지막 방법은 Velog에서 활용할 수 없다.


Code

Markdown으로 문서를 작성하는 사람이라면 대부분 유용하게 쓰일 부분이라 생각한다.

Inline code

문장 속에 Code를 작성하는 경우 유용하다.

At the command prompt, type nano.

At the command prompt, type `nano`.

`을 사용하는 경우 ``로 감싸준다.

Use `code` in your Markdown file.

``Use `code` in your Markdown file.``

Code block

```의 옆에 언어를 적어주면 문법에 맞게 아름답게 보여준다.

print('Hello World!')
``` py
print('Hello World!')
```

[Tab]으로 간단하게 작성도 가능하다.

print('Hello World!')
	print('Hello World!')

대체로 참조를 할 경우 사용한다.

Heading

문서 안에서 Heading을 찾아가는 방법이다. #lowertitle의 방식으로 사용한다.

Title1

Go To Title2

Title2

## Title1

[Go To Title2](#title2)
.
.
.

#### Title2

URL

상황에 따라 적절한 방법을 골라서 사용하는 것이 좋겠다.

https://duckduckgo.com

<https://duckduckgo.com>

My favorite search engine is Duck Duck Go.

My favorite search engine is [Duck Duck Go](https://duckduckgo.com).

My favorite search engine is Duck Duck Go.

My favorite search engine is [Duck Duck Go][1].
.
.
.
[1]: <https://duckduckgo.com>

Horizontal Rules

문서의 구역 구분을 명확하게 하기 위해 사용한다. Heading과 동일하게 위아래 공백의 줄을 요구한다.

text


text

---

Image

Local 경로의 사진을 넣어도 상관 없다.

![shiprock](https://mdg.imgix.net/assets/images/shiprock.jpg?auto=format&fit=clip&q=40&w=1080)

Escaping Characters

\를 통해서 Markdown문법의 특수문자 요소를 일반문자로 사용가능하다.

* Without the backslash, this would be a bullet in an unordered list.

\* Without the backslash, this would be a bullet in an unordered list.
Reference
  1. https://commonmark.org/help/
  2. https://www.markdownguide.org/basic-syntax/

0개의 댓글