Do you use the right anchor names?

Last updated by Tom Bui [SSW] almost 3 years ago.See history

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 #
We open source. Powered by GitHub