Markdown 문법 안내

멋지게 꾸며진 문서 작성을 위한 Markdown 종합 문법 레퍼런스

Markdown은 간단한 기호로 문서 포맷을 지정할 수 있는 경량 마크업 언어입니다. 직관적이고 배우기 쉬워, 기술문서/블로그/노트 등에 널리 활용됩니다. 이 안내서는 MarkPDF에서 지원하는 모든 문법을 다룹니다.

제목(Headings)

# 기호를 사용하여 제목 만들기(H1~H6)

Markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
렌더링 결과
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>

문단・줄바꿈

빈 줄로 문단 구분. 문단 내부 줄바꿈은 줄 끝에 두 칸(스페이스) 추가

Markdown
This is paragraph one.

This is paragraph two.

Line one with two spaces at end  
Line two (soft break)
렌더링 결과
<p>This is paragraph one.</p>
<p>This is paragraph two.</p>
<p>Line one with two spaces at end<br>
Line two (soft break)</p>

강조(Emphasis)

별표(*) 또는 밑줄(_)로 강조 효과

Markdown
*Italic* or _italic_
**Bold** or __bold__
***Bold and italic***
~~Strikethrough~~
렌더링 결과
<em>Italic</em>
<strong>Bold</strong>
<strong><em>Bold and italic</em></strong>
<del>Strikethrough</del>

리스트(Lists)

순서/비순서/중첩 리스트 지원

Markdown
Unordered list:
- Item 1
- Item 2
  - Nested item
  - Another nested

Ordered list:
1. First
2. Second
3. Third
렌더링 결과
<ul>
<li>Item 1</li>
<li>Item 2
  <ul>
  <li>Nested item</li>
  <li>Another nested</li>
  </ul>
</li>
</ul>
<ol>
<li>First</li>
<li>Second</li>
<li>Third</li>
</ol>

코드

인라인 코드는 백틱(`), 코드 블록은 삼중백틱(```) 사용

Markdown
Inline `code` in text.

```javascript
function hello() {
  console.log("Hello!");
}
```
렌더링 결과
<code>code</code>
<pre><code class="language-javascript">
function hello() {
  console.log("Hello!");
}
</code></pre>

표(Tables)

|와 -로 표 작성, 정렬도 지원

Markdown
| Header 1 | Header 2 | Header 3 |
|----------|:--------:|---------:|
| Left     | Center   | Right    |
| Cell     | Cell     | Cell     |
렌더링 결과
<table>
<thead><tr>
<th>Header 1</th>
<th align="center">Header 2</th>
<th align="right">Header 3</th>
</tr></thead>
<tbody>
<tr><td>Left</td><td>Center</td><td>Right</td></tr>
<tr><td>Cell</td><td>Cell</td><td>Cell</td></tr>
</tbody>
</table>

인용문

> 표기로 인용문 작성, 중첩도 가능

Markdown
> This is a blockquote.
> It can span multiple lines.
>
> > Nested blockquote
렌더링 결과
<blockquote>
<p>This is a blockquote.
It can span multiple lines.</p>
<blockquote><p>Nested blockquote</p></blockquote>
</blockquote>

수평선(HR)

세 개 이상 -, *, _로 구분선 삽입

Markdown
---
***
___
렌더링 결과
<hr>

이스케이프(특수문자 표시)

역슬래시(\)로 특수기호를 문자 그대로 표시

Markdown
\*Not italic\*
\# Not a heading
\[Not a link\]
렌더링 결과
*Not italic*
# Not a heading
[Not a link]