Do you use the right anchor names?

Last updated by Tiago Araújo [SSW] 5 months ago.See history

This rule has been archived
Archived Reason: Merged to https://www.ssw.com.au/rules/anchor-links

An anchor name is the value of either the name or id attribute when used in the context of anchors.

It is often that developers find themselves using the anchor names incorrectly.

According to SSW and W3C, anchor names must observe the following rules:

  • Anchor names must be unique within a document
  • ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")
  • Anchor name cannot start with #

Tom Bui
We open source.Loving SSW Rules? Star us on GitHub. Star
Stand by... we're migrating this site to TinaCMS