paint-brush
The Dead Simple Markdown Guide to Headingsby@typesetting

The Dead Simple Markdown Guide to Headings

by TypesettingAugust 20th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Markdown headings are created using number signs (#) corresponding to the heading level. Use alternative syntax for H1 and H2, and remember to include blank lines before and after headings for better compatibility and appearance.
featured image - The Dead Simple Markdown Guide to Headings
Typesetting HackerNoon profile picture

Headings

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).



Alternate Syntax

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


Heading Best Practices

✅  Do this

❌  Don't do this

# Here's a Heading

#Here's a Heading

You should also put blank lines before and after the heading for compatibility.


✅  Do this

❌  Don't do this

Try to put a blank line before…

# Heading

…and after a heading

Without blank lines, this might not look right.
# Heading
Don’t do this!



This guide is a Matt Cone project available on Markdown Guide under the CC BY-SA 4.0 license.