#
) in front of a word or phrase. The number of number signs you use should correspond to the heading level. For example, to create a heading level three (<h3>
), use three number signs (e.g., ### My Header
).Markdown | HTML | Rendered Output |
---|---|---|
# Heading level 1 | <h1>Heading level 1</h1> | |
## Heading level 2 | <h2>Heading level 2</h2> | Heading level 2 |
### Heading level 3 | <h3>Heading level 3</h3> | Heading level 3 |
#### Heading level 4 | <h4>Heading level 4</h4> | Heading level 4 |
##### Heading level 5 | <h5>Heading level 5</h5> | Heading level 5 |
###### Heading level 6 | <h6>Heading level 6</h6> | Heading level 6 |
--
characters for heading level 2.Markdown | HTML | Rendered Output |
---|---|---|
Heading level 1 | <h1>Heading level 1</h1> | |
Heading level 2 | <h2>Heading level 2</h2> | Heading level 2 |
#
) and the heading name. For compatibility, always put a space between the number signs and the heading name.✅ Do this | ❌ Don't do this |
---|---|
# Here's a Heading | #Here's a Heading |
Markdown | HTML | Rendered Output |
---|---|---|
I really like using Markdown. | <p>I really like using Markdown.</p> | I really like using Markdown. I think I'll use it to format all of my documents from now on. |
✅ Do this | ❌ Don't do this |
---|---|
Don't put tabs or spaces in front of your paragraphs. | This can result in unexpected formatting problems. |
<br>
), end a line with two or more spaces, and then type return.Markdown | HTML | Rendered Output |
---|---|---|
This is the first line. | <p>This is the first line.<br> | This is the first line. And this is the second line. |
<br>
HTML tag.<br>
HTML tag at the end of the line.
) at the end of the line, but not all Markdown applications support this, so it isn’t a great option from a compatibility perspective. And at least a couple lightweight markup languages don’t require anything at the end of the line — just type return and they’ll create a line break.✅ Do this | ❌ Don't do this |
---|---|
First line with two spaces after. | First line with a backslash after. |
Markdown | HTML | Rendered Output |
---|---|---|
I just love **bold text**. | I just love <strong>bold text</strong>. | I just love bold text. |
I just love __bold text__. | I just love <strong>bold text</strong>. | I just love bold text. |
Love**is**bold | Love<strong>is</strong>bold | Loveisbold |
✅ Do this | ❌ Don't do this |
---|---|
Love**is**bold | Love__is__bold |
Markdown | HTML | Rendered Output |
---|---|---|
Italicized text is the *cat's meow*. | Italicized text is the <em>cat's meow</em>. | Italicized text is the cat’s meow. |
Italicized text is the _cat's meow_. | Italicized text is the <em>cat's meow</em>. | Italicized text is the cat’s meow. |
A*cat*meow | A<em>cat</em>meow | Acatmeow |
✅ Do this | ❌ Don't do this |
---|---|
A*cat*meow | A_cat_meow |
Markdown | HTML | Rendered Output |
---|---|---|
This text is ***really important***. | This text is <strong><em>really important</em></strong>. | This text is really important. |
This text is ___really important___. | This text is <strong><em>really important</em></strong>. | This text is really important. |
This text is __*really important*__. | This text is <strong><em>really important</em></strong>. | This text is really important. |
This text is **_really important_**. | This text is <strong><em>really important</em></strong>. | This text is really important. |
This is really***very***important text. | This is really<strong><em>very</em></strong>important text. | This is reallyveryimportant text. |
✅ Do this | ❌ Don't do this |
---|---|
This is really***very***important text. | This is really___very___important text. |
>
in front of a paragraph.>
on the blank lines between the paragraphs.>>
in front of the paragraph you want to nest.Markdown | HTML | Rendered Output |
---|---|---|
1. First item | <ol> |
|
1. First item | <ol> |
|
1. First item | <ol> |
|
1. First item | <ol> |
|
)
) as a delimiter (e.g., 1) First item
), but not all Markdown applications support this, so it isn’t a great option from a compatibility perspective. For compatibility, use periods only.✅ Do this | ❌ Don't do this |
---|---|
1. First item | 1) First item |
-
), asterisks (*
), or plus signs (+
) in front of line items. Indent one or more items to create a nested list.Markdown | HTML | Rendered Output |
---|---|---|
- First item | <ul> |
|
* First item | <ul> |
|
+ First item | <ul> |
|
- First item | <ul> |
|
✅ Do this | ❌ Don't do this |
---|---|
- First item | + First item |
A blockquote would look great below the second list item.
`
).Markdown | HTML | Rendered Output |
---|---|---|
At the command prompt, type `nano`. | At the command prompt, type <code>nano</code>. | At the command prompt, type nano . |
``
).Markdown | HTML | Rendered Output |
---|---|---|
``Use `code` in your Markdown file.`` | <code>Use `code` in your Markdown file.</code> | Use `code` in your Markdown file. |
***
), dashes (---
), or underscores (___
) on a line by themselves.✅ Do this | ❌ Don't do this |
---|---|
Try to put a blank line before.. | Without blank lines, this would be a heading. |
[Duck Duck Go]
) and then follow it immediately with the URL in parentheses (e.g., (https://duckduckgo.com)
).code
.[hobbit-hole][1]
[hobbit-hole] [1]
[label]:
).[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle 'Hobbit lifestyles'
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle 'Hobbit lifestyles'
[1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle (Hobbit lifestyles)
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> 'Hobbit lifestyles'
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> 'Hobbit lifestyles'
[1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> (Hobbit lifestyles)
%20
.✅ Do this | ❌ Don't do this |
---|---|
[link](https://www.example.com/my%20great%20page) | [link](https://www.example.com/my great page) |
!
), followed by alt text in brackets, and the path or URL to the image asset in parentheses. You can optionally add a title after the URL in the parentheses.
) in front of the character.Character | Name |
---|---|
backslash | |
` | backtick (see also escaping backticks in code) |
* | asterisk |
_ | underscore |
{ } | curly braces |
[ ] | brackets |
( ) | parentheses |
# | pound sign |
+ | plus sign |
- | minus sign (hyphen) |
. | dot |
! | exclamation mark |
| | pipe (see also escaping pipe in tables) |
<div>
, <table>
, <pre>
, and <p>
from the surrounding content. Try not to indent the tags with tabs or spaces — that can interfere with the formatting.<p>italic and **bold**</p>
won’t work.