Markdown Heading Syntax
To create a heading, add number signs (#
) 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 |
|
| Heading level 2 |
|
| Heading level 3 |
|
| Heading level 4 |
|
| Heading level 5 |
|
| Heading level 6 |
Best Practices
- Always put a space between the number signs and the heading name.
- Put blank lines before and after a heading for compatibility.
- Don't skip heading levels (e.g., from an
<h1>
to an<h3>
).
Next, let's learn about Markdown Paragraph Syntax.