---
name: style-heading-separation
description: Sets blank-line spacing before Markdown headers, scaled by header level and file-length tier
when_to_use: Markdown docs needing header spacing rules when the file-length tier isn't yet known; defers to the long or medium variant once it is
metadata:
version: 1.4.1
---
### Header Separation
You must add *empty lines* before each section header, with the **number of empty lines determined by the header level** provided in the table.
Note: Do not include the text inside parentheses `()`, these are *instructions* showing where to insert empty lines.
#### Long File
| Level | MD Header | Empty Line Before |
|-------|---------------------------------|-------------------|
| 2 | `## Level 2 Header Example` | 34 |
| 3 | `### Level 3 Header Example` | 13 |
| 4 | `#### Level 4 Header Example` | 5 |
| 5 | `##### Level 5 Header Example` | 3 |
| 6 | `###### Level 6 Header Example` | 2 |
(...)
Brief project description.
(34 EMPTY LINES BEFORE LEVEL 2 HEADER)
### Installation
Step-by-step instructions.
(13 EMPTY LINES BEFORE LEVEL 3 HEADER)
#### Usage
(...)
#### Medium File
| Level | MD Header | Empty Line Before |
|-------|---------------------------------|-------------------|
| 2 | `## Level 2 Header Example` | 13 |
| 3 | `### Level 3 Header Example` | 5 |
| 4 | `#### Level 4 Header Example` | 3 |
| 5 | `##### Level 5 Header Example` | 2 |
| 6 | `###### Level 6 Header Example` | 1 |
(...)
Brief project description.
(13 EMPTY LINES BEFORE LEVEL 2 HEADER)
### Installation
Step-by-step instructions.
(5 EMPTY LINES BEFORE LEVEL 3 HEADER)
#### Usage
(...)