Skip to content

Latest commit

 

History

History
132 lines (124 loc) · 4.74 KB

File metadata and controls

132 lines (124 loc) · 4.74 KB
title Headings
syntax-id headings
syntax-summary # H1 ## H2 ### H3
description 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`).
examples
markdown html
# Heading level 1
<h1>Heading level 1</h1>
markdown html
## Heading level 2
<h2>Heading level 2</h2>
markdown html
### Heading level 3
<h3>Heading level 3</h3>
markdown html
#### Heading level 4
<h4>Heading level 4</h4>
markdown html
##### Heading level 5
<h5>Heading level 5</h5>
markdown html
###### Heading level 6
<h6>Heading level 6</h6>
additional-examples
name description markdown html
Alternative H1 Syntax
Alternatively, on the line below the text, add any number of == characters for heading level 1.
Heading level 1 ===============
<h1>Heading level 1</h1>
name description markdown html
Alternative H2 Syntax
Alternatively, on the line below the text, add any number of -- characters for heading level 2.
Heading level 2 ---------------
<h2>Heading level 2</h2>

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 <h1>Heading level 1</h1>

Heading level 1

## 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

Alternate Syntax

Alternatively, on the line below the text, add any number of == characters for heading level 1 or -- characters for heading level 2.

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

Heading level 1

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

Heading level 2

Heading Best Practices

Markdown applications don't agree on how to handle a missing space between the number signs (#) 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