Markdown Headings

❮ Previous Home Next ❯

To create a heading, add hash signs (#) in front of a 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 <h4>, use three number signs (e.g., #### Heading).

Syntax:

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
Markdown HTML Output
# Heading 1 <h1>Heading 1</h1>

Heading 1

## Heading 2 <h2>Heading 2</h2>

Heading 2

### Heading 3 <h3>Heading 3</h3>

Heading 3

#### Heading 4 <h4>Heading 4</h4>

Heading 4

##### Heading 5 <h5>Heading 5</h5>
Heading 5
###### Heading 6 <h6>Heading 6</h6>
Heading 6

The following example show how to create heading level 1 to 6.

Example

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6



Alternate Syntax

The line below the text, add == characters for heading level 1 and -- characters for heading level 2.

Syntax:

Heading 1
===============

Heading 2
---------------

The following table show how to add heading.

Markdown HTML Rendered Output
Heading 1
===============
<h1>Heading 1</h1>

Heading 1

Heading 2
---------------
<h2>Heading 2</h2>

Heading 2

The following example show how to create alternative headings.

Example

Heading 1
===============

Heading 2
---------------






Best Practices

The Markdown don’t agree on how to handle a missing space between the hash sign/s (#) and the heading. For best practices, always put a space between the hash signs and the heading.

Good ✅ bad ❌
# Heading #Heading
Lorem Ipsum is simply dummy text...

# Heading

Lorem Ipsum is simply dummy text...
Lorem Ipsum is simply dummy text...
# Heading
Lorem Ipsum is simply dummy text...
❮ Previous Home Next ❯