마크다운(Markdown)은 일반 텍스트 기반의 경량 마크업 언어입니다. 일반 텍스트로 서식이 있는 문서를 작성하는 데 사용되며, HTML과 리치 텍스트(RTF) 등 서식 문서로 쉽게 변환되기 때문에 README 파일이나 온라인 게시물 등에 많이 사용됩니다.
- 위키백과 -
제목에 해당하는 요소로 #
의 개수에 따라 h1
부터 h6
까지 표현할 수 있습니다.
h1
, h2
의 경우 각각 =
,-
를 사용해 표현할 수도 있습니다.✏ Example
h1
=
h2
-
👀 Result
✏ Example
# h1
## h2
### h3
#### h4
##### h5
###### h6
👀 Result
HTML의 font-style과 유사한 역할로 굵게, 기울이기, 취소선, 언더라인 등의 스타일을 폰트에 적용합니다.
✏ Example
**bold text**
__bold text__
👀 Result
bold text
bold text
✏ Example
*italicized text*
_italicized text_
👀 Result
italicized text
italicized text
✏ Example
***bold and italic text***
___bold and italic text___
👀 Result
bold and italic text
bold and italic text
✏ Example
~~strikethrough text~~
👀 Result
strikethrough text
✏ Example
<u>underline text</u>
👀 Result
underline text
인용문 작성시 사용되는 요소입니다.
✏ Example
> blockquote 1
>> blockquote 2
>>> **blockquote 3 - 다른 마크다운 요소 사용**
👀 Result
blockquote 1
blockquote 2
blockquote 3 - 다른 마크다운 요소 사용
숫자.
의 형태로 사용하며 순서있는 목록으로 표시합니다.
✏ Example
1. First item
2. Second item
3. Third item
1. First item
2. Second item
3. Third item
4. Fourth item
1. First item
1. Second item
2. Third item
👀 Result
First item
Second item
Third item
Fourth item
*
, +
, -
기호를 사용하여 작성하고 순서없는 목록으로 표시합니다.
Tab
, Space Bar
키를 이용해 들여쓰기가 가능합니다.*
, +
, -
기호에 상관없이 동일한 기능을 하며 혼합해서 사용해도 됩니다.✏ Example
* First item
* Second item
* Third item
* Fourth item
* First item
+ Second item
- Third item
👀 Result
사전처럼 용어를 설명하는 정의 목록을 표시할때 사용합니다.
✏ Example
First Term // Velog 에서는 적용되지 않습니다.
: This is the definition of the first term.
Second Term // Velog 에서는 적용되지 않습니다.
: This is one definition of the second term.
: This is another definition of the second term.
<dl>
<dt>First Term</dt>
<dd>This is the definition of the first term.</dd>
<dt>Second Term</dt>
<dd>This is one definition of the second term. </dd>
<dd>This is another definition of the second term.</dd>
</dl>
👀 Result
First Term
: This is the definition of the first term.
Second Term
: This is one definition of the second term.
: This is another definition of the second term.
코드를 중간에 삽입하거나 여러줄의 코드를 블럭으로 작성하기 위한 요소입니다.
글 중간에 코드를 강조해서 삽입할 수 있습니다
✏ Example
`inline code`
`**inline code**`
👀 Result
inline code
**inline code**
여러줄의 코드를 블럭으로 작성할 수 있으며 언어 종류를 명시해주면 문법강조(Syntax Highlighting) 효과를 얻을 수 있습니다.
<pre><code>내용</code></pre>
를 사용하여 코드블럭을 작성할 수 있습니다.✏ Example
```
console.log('Hello World 1!!');
```
```typescript
console.log('Hello World 2!!');
```
console.log('Hello World 3!!');
<pre>
<code>
console.log('Hello World 4!!');
</code>
</pre>
👀 Result
console.log('Hello World 1!!');
console.log('Hello World 2!!');
console.log('Hello World 3!!');
console.log('Hello World 4!!');
수평선을 만드는 요소로 *
, -
기호을 한줄에 세번 쓰는것으로 사용 가능하며, 단락을 분리할 때 주로 사용합니다.
✏ Example
---
----
----------
- - -
***
**********
* * *
👀 Result
인라인 링크, URL 링크, 참조 링크 형태로 사용할 수 있으며 클릭시 지정한 URL로 이동합니다.
클릭시 지정한 URL로 이동할 수 있는 링크를 생성하며 alt
값을 추가로 설정할 수 있습니다.
#id
를 사용하면 id
가 부여된 요소로 이동할 수 있습니다.✏ Example
[Go Velog 1](https://velog.io)
[Go Velog 2](https://velog.io/, "velog link") // alt값 설정
### My Great Heading 1 {#custom-id-1} // id 지정, Velog 에서는 적용되지 않습니다.
[Go Velog 3](#custom-id-1)
<h3 id="custom-id-2">My Great Heading 2</h3>
[Go Velog 4](#custom-id-2)
👀 Result
Go Velog 1
Go Velog 2
Go Velog 3
Go Velog 4
✏ Example
<https://velog.io>
👀 Result
✏ Example
Velog Link: [Go Velog][veloglink]
[veloglink]:https://google.com "velog link"
👀 Result
Velog Link: Go Velog
이미지를 출력할 수 있는 요소로 ![]()
형태로 사용하며 alt
값을 추가로 설정할 수 있습니다.
<img>
태그를 사용해 width
, height
, title
, alt
속성을 적용할 수 있습니다.✏ Example

<img src="image.jpg" width="100px" height="80px" title="(px)크기 적용" alt="Markdown" />
<img src="image.jpg" width="20%" height="15%" title="(%)크기 적용" alt="Markdown" />
👀 Result
인위적으로 줄바꿈을 적용할때 사용하며 여러번 사용하면 횟수만큼 줄바꿈이 적용됩니다.
✏ Example
First Line<br />Second Line
👀 Result
First Line
Second Line
인위적으로 줄바꿈을 적용할때 사용하며 여러번 사용하면 횟수만큼 줄바꿈이 적용됩니다.
|
기호를 사용하고 Header 셀 아랫줄에 |---|
을 입력하여 구분합니다.-
기호는 하나만 입력해도 사용 가능하며 여려개 입력해도 동일하게 적용됩니다.(|-|
, |---|
, |-----|
):
기호를 |-|
좌, 우측에 넣어 사용 가능합니다.|:--|
왼쪽 정렬|:-:|
가운데 정렬|--:|
오른쪽 정렬✏ Example
| 정렬 없음 | 왼쪽 정렬 | 가운데 정렬 | 오른쪽 정렬 |
| - | ----------- |
| Header | Title |
| Paragraph | Text |
👀 Result
정렬 없음 | 왼쪽 정렬 | 가운데 정렬 | 오른쪽 정렬 |
---|---|---|---|
Content 1 | Left | center | right |
Content 2 | Left | center | right |
체크박스 형태로 할일을 표시하는데 사용합니다.
✏ Example
- [x] Write the press release
- [ ] Update the website
- [ ] Contact the media
👀 Result
체크박스 형태로 할일을 표시하는데 사용하는 요소입니다.
✏ Example
강조를 해봅시다 ==매우 강조!!== // Velog 에서는 적용되지 않습니다.
강조를 해봅시다 <mark>매우 강조!!</mark>
👀 Result
강조를 해봅시다 ==매우 강조!!==
강조를 해봅시다 매우 강조!!
위 첨자, 아래 첨자를 표시하는데 사용하는 요소입니다.
✏ Example
X^2^ // Velog 에서는 적용되지 않습니다.
X<sup>2</sup>
👀 Result
X^2^
X2
✏ Example
H~2~O // Velog 에서는 적용되지 않습니다.
H<sub>2</sub>O
👀 Result
H~2~O
H2O
여러 종류의 이모지를 사용할 수 있습니다.🙂
:이모지명칭:
형태로 이모지를 사용할 수 있습니다.✏ Example
That is so funny! :joy: // Velog 에서는 적용되지 않습니다.
🙂
👀 Result
That is so funny! :joy:
🙂
제가 봤던 마크다운 작성법중에 가장 정리가 잘 되어있는 것 같습니다. 감탄중.. 근데 이미지 사이즈는 왜 안되는걸까요? ㅠ