Require <map name> to be unique

Rule ID:
map-dup-name
Category:
HTML Syntax and concepts
Standards:
  • HTML5

In HTML5 the <map name> attribute is required to be a unique name within the document.

Rule details

Examples of incorrect code for this rule:

<map name="foo"></map>
<map name="foo"></map>
error: <map> name must be unique (map-dup-name) at inline:2:6:
  1 | <map name="foo"></map>
> 2 | <map name="foo"></map>
    |      ^^^^


1 error found.

Examples of correct code for this rule:

<map name="foo"></map>
<map name="bar"></map>

Version history