Markdown 문법 가이드
문서 포맷의 기본 문법
개요
Markdown은 평문에 포맷을 더하는 가벼운 마크업 언어입니다. 2004년 John Gruber가 만들었고, 전 세계에서 널리 쓰입니다.
Markdown은 WYSIWYG 에디터와 다릅니다. Word처럼 버튼으로 포맷하지 않고, 텍스트에 문법을 넣어 어떤 구절을 어떻게 보일지 지정합니다.
제목
제목은 단어나 구절 앞에 #을 붙입니다. # 개수가 단계(예: ### = 3단계)입니다.
Heading level 1
Heading level 2
Heading level 3
Heading level 4
Heading level 5
Heading level 6
단락
단락은 빈 줄로 구분합니다.
It lets me write easily.
<p>It lets me write easily.</p>
I really like using Markdown.
It lets me write easily.
줄바꿈
줄 끝에 공백 두 개 이상 넣고 Enter.
And this is the second line.
And this is the second line.</p>
This is the first line.
And this is the second line.
강조
굵게나 기울임으로 강조할 수 있습니다.
굵게
단어나 구절 앞뒤에 ** 또는 __.
I just love bold text.
I just love bold text.
기울임
단어나 구절 앞뒤에 * 또는 _.
The cat meows.
The cat meows.
굵게·기울임
앞뒤에 *** 또는 ___.
This text is really important.
This text is really important.
인용
단락 앞에 >.
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.
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.
목록
순서·비순서 목록을 쓸 수 있습니다.
순서 목록
각 줄을 숫자와 마침표로 시작. 1부터.
2. Second item
3. Third item
4. Fourth item
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
- First item
- Second item
- Third item
- Fourth item
비순서 목록
각 줄을 -, *, + 중 하나로 시작.
- Second item
- Third item
- Fourth item
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ul>
- First item
- Second item
- Third item
- Fourth item
코드
단어나 구절을 백틱 `로 감싸면 코드.
At the command prompt, type nano.
코드 블록
각 줄을 공백 4개 또는 탭 1개 들여쓰기, 또는 ```로 블록 앞뒤 감싸기.
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}
```
{
"firstName": "John",
"lastName": "Smith",
"age": 25
}수평선
***, ---, ___만 있는 줄.
링크
링크 텍스트를 [ ]로, URL을 ( )로. 예: [Duck Duck Go](https://duckduckgo.com).
My favorite search engine is Duck Duck Go.
링크에 제목 추가
URL 뒤에 따옴표로 제목을 넣으면 마우스 오버 시 툴팁으로 표시됩니다.
My favorite search engine is Duck Duck Go.
이미지
! 뒤에 [대체 텍스트]와 (URL 또는 경로). 선택적으로 따옴표로 제목.

이스케이프
포맷용 문자를 그대로 쓰려면 앞에 백슬래시 \.
* Without the backslash, this would be a bullet in an unordered list.
이스케이프할 수 있는 문자
백슬래시로 이스케이프하는 예:
| \ | backslash |
| ` | backtick |
| * | asterisk |
| _ | underscore |
| { } | curly braces |
| [ ] | brackets |
| ( ) | parentheses |
| # | pound sign |
| + | plus sign |
| - | minus sign (hyphen) |
| . | dot |
| ! | exclamation mark |
| | | pipe |
표
---로 각 열 헤더를 만들고 |로 열 구분.
| --------- | ----------- |
| Header | Title |
| Paragraph | Text |
| Syntax | Description |
|---|---|
| Header | Title |
| Paragraph | Text |
정렬
헤더 행 ---의 왼쪽·오른쪽·양쪽에 :를 넣어 정렬.
| :--- | :---: | ---: |
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |
| 왼쪽 | 가운데 | 오른쪽 |
|---|---|---|
| This | This | This |
| column | column | column |
| will | will | will |
| align | align | align |
| left | center | right |