# MD018 - No Missing Space in ATX Heading
## Description
This rule ensures that there is a space between the hash signs (#) and the heading text in ATX-style headings.
A missing space can cause inconsistent rendering across different Markdown processors.
## Examples
### Valid
```markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
```
### Invalid
```markdown
#Heading 1
##Heading 2
###Heading 3
####Heading 4
#####Heading 5
######Heading 6
```
### Fixed
```markdown
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
```
## Special Cases
- This rule only applies to ATX-style headings (those that start with hash signs)
- It does not apply to closed ATX headings (those with hash signs at both the beginning and end)
- It does not apply to setext-style headings (those underlined with = or -)
- Empty headings (just hash signs with no text) are not affected
## Related Rules
- [MD019 - No multiple spaces after hash in ATX heading](md019.md): Ensures there is only one space after the hash signs
- [MD020 - No missing space in closed ATX heading](md020.md): Similar rule for closed ATX headings
- [MD021 - No multiple spaces in closed ATX heading](md021.md): Ensures consistent spacing in closed ATX headings