Next: , Previous: Setext-style headers, Up: Headers

5.3.2 Atx-style headers

An Atx-style header consists of one to six # signs and a line of text, optionally followed by any number of # signs. The number of # signs at the beginning of the line is the header level:

## A level-two header

### A level-three header ###

As with setext-style headers, the header text can contain formatting:

# A level-one header with a [link](/url) and *emphasis*

Extension: blank_before_header

Standard markdown syntax does not require a blank line before a header. Pandoc does require this (except, of course, at the beginning of the document). The reason for the requirement is that it is all too easy for a # to end up at the beginning of a line by accident (perhaps through line wrapping). Consider, for example:

I like several of their flavors of ice cream:
#22, for example, and #5.