This is a generic error page which should help you in general with errors of this type. Refer below to the specific examples for more precise advice.

How to fix: Attribute X not allowed on element Y at this point.

Most Likely Cause and Fix

Your markup contains a <Y> element with a X attribute in the form <Y X="value" />.

Attribute X is not allowed on element <Y>.

You should remove this attribute for your markup to be valid or consider using HTML5 custom data attributes.

What This Error Means

There is a defined set of attributes for each HTML element. You may choose to omit some but you cannot choose to add further attributes beyond those defined.

<img src="http://example.com/image.png" alt="Desc" />

This error is saying that in the context of <Y X="value" />, the attribute X is not allowed.

How To Fix It

In general

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.

Your markup contains a <Y> element with a X attribute in the form <X Y="value" />.

Attribute X is not allowed on element <Y>.

Use

<Y … />

instead of

<Y X="value" … />

or consider using a HTML5 custom data attribute

<Y data-X="value" … />

Discuss, Comment and Improve

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

comments powered by Disqus