Markdown headings

One to six hash signs and a space make heading levels 1 to 6. Use one H1 per document and don’t skip levels.

# Heading 1
## Heading 2
### Heading 3
#### Heading 4

Alternate H1
============

Alternate H2
------------

#No space is not a heading

ATX headings

# through ###### . The space after the hashes is required in CommonMark: #Title stays a paragraph (and on GitHub, a hashtag-like link).

Setext headings

Underline a line with === for H1 or --- for H2. Only two levels, and --- under a paragraph can be mistaken for a horizontal rule, so ATX is usually clearer.

Structure

Use one H1 as the document title and nest in order (H2, then H3). Screen-reader users navigate by headings, and markdownlint rules MD001 and MD025 flag skipped levels and multiple H1s.

Anchors

Renderers create an id from the heading text, so you can link to #heading-text. See links. The editor here can insert a linked table of contents from your headings.

Blank lines

Put a blank line before and after headings. Some renderers require it, and it keeps the source readable.

Quick answers

How do I make a heading in Markdown?
Start the line with # and a space for H1, ## for H2, up to six.
Why is my heading not rendering?
You probably left out the space after the #.