What are headings in Markdown?
A heading in any document seeks to provide a brief explanation of what the subsequent text is about.
Generally, there are about six types of headings, and each comes with a different font size.
Markdown provides a syntax for all six heading types as seen in the examples below.
We will however take a look at the syntax for the three most used heading types.
H1 heading example
Heading one (H1) has the largest font size and is used as the title of an entire document.
Below is an example of an H1 heading in markdown, it's denoted by the
# symbol followed by the text for the heading.
H2 heading example
Heading two (H2) has a smaller font size compared to heading one and is used to describe sub-section text.
Below is an example of an H2 heading in markdown, its syntax is similar to that of H1 but has an additional
H3 heading example
Heading three (H3) is only used in situations where within a sub-section there are other sub-sections, this is rarely used and a list is usually used in place of that.
The syntax as you might have guessed by now is made up of three hash symbols followed by the heading text.
Other heading types
By now, I'm sure you've deduced a pattern regarding the syntax for different heading types. Heading types are determined by the number of hashes preceding them.
As an example, you would precede a heading with five hashes for a much much lower heading type ie:
##### Heading text.
Here is another article for you 😊 "Formatting text in Markdown"