[GH-ISSUE #1488] MD051 - Does not consider the automatically generated #top link fragment #2544

Closed
opened 2026-03-07 20:08:45 +03:00 by kerem · 0 comments
Owner

Originally created by @mslinn on GitHub (Feb 10, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1488

Every HTML page responds to the #top link fragment. See MDN.

Note: You can use href="#top" or the empty fragment (href="#") to link to the top of the current page, as defined in the HTML specification.

Using #top should not trigger MD051 - Link fragments should be valid.

Originally created by @mslinn on GitHub (Feb 10, 2025). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1488 Every HTML page responds to the `#top` link fragment. [See MDN.](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#linking_to_an_element_on_the_same_page) > Note: You can use href="#top" or the empty fragment (href="#") to link to the top of the current page, [as defined in the HTML specification](https://html.spec.whatwg.org/multipage/browsing-the-web.html#scroll-to-the-fragment-identifier). Using `#top` should not trigger *MD051 - Link fragments should be valid*.
kerem 2026-03-07 20:08:45 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2544
No description provided.