Home/Docs/Markdown Headings

Markdown Headings

Markdown headings help organize your content into clear sections. They make README files, documentation, notes, blogs, and tutorials easier to read and navigate.

This guide explains every Markdown heading level, proper syntax, best practices, GitHub compatibility, and common mistakes with practical examples.

Practice as you read: Open the Markdown Editor to try heading syntax with live preview, or bookmark the Markdown Cheat Sheet for quick reference while writing documentation.

Open EditorDownload PDF

What are Markdown Headings?

A Markdown heading is created by placing one or more hash (#) characters before text.

The number of hash symbols determines the heading level.

# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6

If you're completely new to Markdown, start with Markdown Basics before diving into heading structure.

Heading Levels

Markdown supports six heading levels from H1 through H6.

Level Syntax Typical Use
H1 # Heading Document title
H2 ## Heading Major sections
H3 ### Heading Subsections
H4 #### Heading Smaller sections
H5 ##### Heading Rarely used
H6 ###### Heading Smallest heading

Each level creates a nested outline that readers and screen readers can follow. For every other syntax rule in one place, see the Markdown Syntax reference.

Heading Examples

A typical README or documentation page might look like this:

# My Project

## Installation

### Windows

### macOS

## Usage

### Examples

## License

This structure creates a clear document hierarchy that is easy to scan.

Rendered outline

Rendered Output

My Project

Installation

Windows

macOS

Usage

Examples

License

H1 Heading

The H1 heading should usually appear only once on a page.

# Markdown Guide

Good examples

# README

# User Documentation

# API Reference

Avoid using multiple H1 headings unless your platform specifically supports it.

H2 Headings

Use H2 headings for the main sections of your document.

## Installation

## Usage

## Features

## FAQ

Most documentation pages are primarily built using H2 sections.

H3 to H6 Headings

Use lower heading levels when you need additional organization.

## Installation

### Windows

### Linux

### macOS

#### Ubuntu

##### Docker

###### Advanced Configuration

Only use deeper heading levels when they improve readability.

Alternate Heading Style

Markdown also supports Setext-style headings.

Heading Level 1
===============

Heading Level 2
---------------

Example

Markdown Guide
==============

Installation
------------

Although valid, most modern Markdown editors recommend using # headings because they are easier to read and maintain.

GitHub Markdown Headings

GitHub fully supports all heading levels.

# Repository

## Installation

## Usage

## License

GitHub also automatically generates anchor links for headings, allowing users to jump directly to sections using the table of contents.

Headings in Common Markdown Editors

The standard heading syntax works consistently across nearly every Markdown application.

Platform Supported
GitHub โœ…
VS Code โœ…
Obsidian โœ…
Notion โœ…
GitLab โœ…
Markdown Preview โœ…

Best Practices

Follow these recommendations for clean documentation.

  • Use only one H1 per page.
  • Leave one space after the #.
  • Keep headings short and descriptive.
  • Maintain a logical hierarchy.
  • Don't skip heading levels unnecessarily.
  • Use sentence case or title case consistently.

Good

## Installation Guide

Bad

##Installation Guide

Common Mistakes

Missing space

Incorrect

##Heading

Correct

## Heading

Multiple H1 headings

Avoid this

# Project

# Installation

Instead

# Project

## Installation

Skipping levels

Instead of

# Project

#### Installation

Use

# Project

## Installation

### Requirements

Accessibility Tips

Proper heading order improves accessibility and navigation for screen readers.

A recommended structure looks like this:

# Page Title

## Section

### Subsection

### Another Subsection

## Next Section

This also helps search engines understand page structure.

When Should You Use Each Heading?

Heading Best Use
H1 Page title
H2 Main content sections
H3 Subsections
H4 Detailed topics
H5 Minor divisions
H6 Rarely needed

Continue Learning

Continue learning Markdown with these guides:

Available now

Coming soon to MDConvertHub Docs

  • Markdown Code Blocks

Each guide explores one topic in greater detail with examples and best practices.

Frequently Asked Questions

  1. 1

    Can I have multiple H1 headings?

    Technically yes, but one H1 per page is considered the best practice for documentation and SEO.

  2. 2

    Do all Markdown editors support headings?

    Yes. Headings are part of the original Markdown specification and are supported by nearly every Markdown application.

  3. 3

    Which heading style should I use?

    Use the hash (#) style because it is supported everywhere and easier to maintain.

  4. 4

    Does GitHub support H1 through H6?

    Yes. GitHub supports all six heading levels.

  5. 5

    Why aren't my headings working?

    The most common reason is forgetting to add a space after the hash character. Write `## Heading`, not `##Heading`.