Markdown Headings
Headings are created by adding hash characters (#) before your text. The number of hashes determines the heading level.
Markdown supports six levels of headings, corresponding to the HTML heading tags h1 through h6.
Heading Syntax
To create a heading, add one to six # symbols before your heading text. The number of # symbols you use should correspond to the heading level. For example, to create a level-three heading (h3), use three symbols (e.g., ### My Heading).
Alternative Syntax
Alternatively, on some Markdown processors, you can use underlines for h1 and h2 headings. This is known as Setext-style headings.
- For
h1, use any number of equal signs (=) on the line below the text. - For
h2, use any number of hyphens (-) on the line below the text.
Best Practices
While some Markdown processors allow you to omit the space between the hashes and the heading text (e.g., ##Heading), it's a best practice to always include a space (e.g., ## Heading) for better compatibility and readability.