HTML Checking for Large Sites
Rocket Validator automatically scans your sites for accessibility issues using the W3C Validator,
hosted on our own servers and integrated into our web crawler.
Bad value “X%” for attribute “width” on element “img”: Expected a digit but saw “%” instead.
<img>
elements accept a width
attribute to specify the size in pixels. This value can only be an integer, it should not contain units or %
. If you need to specify a percentage width, you can do that with CSS:
<img src="photo.jpg" alt="red car" style="width:100%;">
Related W3C validator issues
- An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.
- Bad value “” for attribute “src” on element “img”: Must be non-empty.
- Bad value “X” for attribute “src” on element “img”: Illegal character in path segment: space is not allowed.
- Bad value “X” for attribute “src” on element “img”: Illegal character in scheme data: space is not allowed.
- Bad value X for attribute “width” on element “iframe”: Expected a digit but saw “%” instead.
- Element “img” is missing required attribute “src”.
- The “border” attribute is obsolete. Consider specifying “img { border: 0; }” in CSS instead.
- The “width” attribute on the table (or td) element is obsolete. Use CSS instead.
- When the “srcset” attribute has any image candidate string with a width descriptor, the “sizes” attribute must also be present.