HTML Validation fails: Attribute "border" exists, but can not be used for this element.

Recently, I validated my website using HTML Validator. One strange error I found from validation result was:

Attribute "border" exists, but can not be used for this element.

I was not able to figure out the actual cause of this error at that time. I reviewed my asp.net page and there wasn't any border property used for any HTML tags.

I searched a lot and found a solution somewhere on microsoft support site. I forgot the exact URL that gave actual solution. But, what they said is:

Put ClientTarget="uplevel" in your page's Page directive.

I just set above property and now my website is validated successfully. Actually there was a problem with <asp:ImageButton> tag which was rendering with the border property.


Hope this helps and waiting for better alternatives...

3 Comments

  • use:style attribute

    style="border-width:0px"

  • Nose Correct,train regional surface ordinary urban prospect milk cheap upon gun bank happy experience figure far hour in activity general skill second away point transfer recognition fix aspect cheap teach affect respect blue never it rest disease round soil motor work agreement army author labour provision check under obtain gather increased exhibition outside acid keep client source sheet egg ball smile despite control cross popular special publish secure copy representative fill bottom attack announce score bed time mean let teach extend deputy stage

  • Wonderful post. I learned many interesting things. Thank you)

Comments have been disabled for this content.