How to fix: Required attribute "id" not specified

Most Likely Cause and Fix

Your XHTML document contains a <map> element that lacks the required id attribute.

<map>
…
</map>

Add a suitable id attribute to each <map> element where missing:

<map id="unique-identifier">
…
</map>

Or switch to a HTML4 or HTML5 document type where the id attribute is not required.

What This Error Means

There is a defined set of attributes for each HTML element. Some are required for your markup to be considered valid.

You have omitted the required id attribute on an element that requires it.

How To Fix It

The specific error message you encountered will refer to a line and column number. This will guide you to the exact point in your markup to which the error relates.

For map elements

You've most likely forgotten to add an id attribute to a <map> element.

<map>
…
</map>

Add an id attribute to each <map /> element where missing.

<map id="unique-identifier">
…
</map>

Or switch to a HTML4 or HTML5 document type where the id attribute is not required.

In general

Find the relevant element and add the missing id attribute.

Discuss, Comment and Improve

Did this help you? Can this page be improved? Let us know!

comments powered by Disqus