Clicky

  1. Home
  2. Troubleshooting
  3. How to fix “Disallowed attribute or attribute value present in HTML tag”

How to fix “Disallowed attribute or attribute value present in HTML tag”

This error occurs when the property name inside an attribute isn’t allowed.

If you are getting this type of error “Disallowed attribute or attribute value present in HTML tag.” like below the screenshot.

For example, In select tag, if you are creating the mid attribute. The validation error comes due to the attribute that you are using for creating. Please see the below

For this, you need to remove this mid attribute once you remove mid attribute then check on this website – https://validator.ampproject.org/ is your page Valid or not

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.

Ask your Questions Directly!
If you can't find the solutions in this article, then just ask us in the comments and we will answer it for you!
Updated on July 23, 2019

    Are you still looking for a solution?

    Then fill out the below form and we will reach out to you within a few hours.


    Was this article helpful?

    Related Articles

    Comments

      1. Hi Rahman RB,

        Will you please elaborate more about your issue so that we will understand and help you.

    1. Hello, There/Sonali,

      As you are telling us that we have to remove that code,
      Ok, I understand and able to do this in any static or any custom dynamic site but can you tell me, How can do this same a WordPress site?

    2. Hi, I face this amp problem on my site please guide thanks

      1. Hi Abdul Razzaq,

        Will you please elaborate more about your issue so that we will understand and help you.

      1. Hi Nitish Thakur,

        We have checked your website and found that there is no error at the moment and still if you are facing an issue/problem then contact our technical team – https://ampforwp.com/support/ they will help you as soon as possible.

    3. Hello, in reference to the disallowed attributes like the 2 that come up within my website are the words “action” and “target”, would I just go into the code and delete those words manually or pin point why it’s in there in the first place?

    4. I have created a Post on How To Change The Download Location In Google Chrome and the link to the post is https://digitaldopes.com/how-to-change-the-download-location-in-google-chrome/ I am getting “disallowed attribute value present in HTML tag” error in webmaster tool and I checked in https://validator.ampproject.org, found The attribute ‘srcset’ in tag ‘amp-img’ is set to the invalid value.

      I want to correct it, I am using WordPress with the AMP plugin and how can i correct this please guide me sir.

    Leave a Comment