Skip to content

New Rule: single-h1 #373

Closed
Closed
@Pixel998

Description

@Pixel998

Rule details

This rule enforces that a Markdown document contains at most one top-level heading.

What type of rule is this?

Warns about a potential problem

Example code

Examples of incorrect code:

# Top level heading

# Another top-level heading

Participation

  • I am willing to submit a pull request to implement this rule.

Additional comments

Rationale: Using multiple h1 elements can disrupt the semantic hierarchy of a document. Search engines and assistive technologies rely on a clear heading structure to understand the content's organization. A single h1 clearly identifies the primary topic.

Prior Art:
MD025

Activity

nzakas

nzakas commented on May 13, 2025

@nzakas
Member

Sounds good to me. 👍

moved this from Needs Triage to Ready to Implement in Triageon May 13, 2025
moved this from Ready to Implement to Implementing in Triageon May 17, 2025
moved this from Implementing to Complete in Triageon May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Complete

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @nzakas@Pixel998

    Issue actions

      New Rule: single-h1 · Issue #373 · eslint/markdown