HTML Checking for Large Sites
Rocket Validator automatically checks your pages on the W3C Validator.
HTML issues tagged as height.
The <table>
element does not accept a height
attribute. Use CSS instead.
The width
and height
attributes on <img>
elements expect a digit to specify the dimension in pixels. It should not contain units, letters or percent signs.
You can achieve this using CSS instead, for example:
<!-- Invalid syntax, the height attribute expects only digits -->
<img src="photo.jpg" alt="cat" height="auto" />
<!-- Valid syntax using CSS -->
<img src="photo.jpg" alt="cat" style="height: auto" />
Learn more:
The attributes width
and height
of <img>
elements expect a non-negative integer, so an empty string is not allowed. Either define the correct dimension, or remove this attribute.
Learn more:
The <iframe>
element, used to embed another document inside the current document, accepts both attributes width
and height
which must be valid non-negative integers. Percentages are not allowed for these attributes.
Check the iframe spec.
The attributes width
and height
on <img>
elements define the dimensions of the image in CSS pixels, and expect a non-negative integer.
Learn more:
The width
and height
attributes on <img>
and <iframe>
elements expect a digit to indicate the number of pixels. Ensure that this attribute contains only digits.
For example:
<!-- This is invalid because width is not a digit -->
<img width="225px" height="100px" alt="cat" src="cat.jpg" />
<!-- This is valid -->
<img width="225" height="100" alt="cat" src="cat.jpg" />
When was the last time you validated your whole site?
Keep your sites healthy checking for A11Y/HTML issues on an automated schedule.