Fix An Attribute Value Specification

An attribute value specification must be an attribute value literal unless SHORTTAG YES is specified

I have encountered this problem with W3C validator, which you may have too.

In my situation, the error came from putting html code <img alt="" />


It can happen with padding css code as well, the error message will be “an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified” (see image).

The error message.

I try as i can, to clean up and validate my blog’s code, this is why some small things like this i have to fix.

To fix it, add ” or ” for the width, height, or padding, depends on your source code.

My code was like this;
width=25 height=20

The fix was like this.
width="25" height="20"

Image:

The fix, " or '

After you correct the code, you can then “revalidate” your document again.

Share the knowledge
Share on Google+0Tweet about this on TwitterShare on Facebook0Pin on Pinterest0Share on Reddit0Email this to someonePrint this page