About This HTML Issue
The border attribute is obsolete on the <input> element, and a border on an image button belongs in CSS.
Old markup often puts border="0" on <input type="image">, the image button, a habit copied from linked images. The HTML standard lists border on input as an obsolete attribute, and the validator warns about it on every input type, submit and text included.
Browsers still apply the attribute in one case. On an image button, a value above zero draws a solid border that many pixels wide. A value of 0 changes nothing, and browsers ignore the attribute on every other input type. On most pages you can delete it and nothing on screen changes.
The message suggests img { border: 0; }, but that rule styles <img> elements, not inputs. If the attribute had a value above zero and you want to keep the border, write a CSS rule for the image button itself.
Invalid example
<form action="/search">
<input type="search" name="q" aria-label="Search">
<input type="image" src="search.png" alt="Search" border="0">
</form>
Valid example
<form action="/search">
<input type="search" name="q" aria-label="Search">
<input type="image" src="search.png" alt="Search">
</form>
If the old value was border="2", this rule in your stylesheet draws the same border:
input[type="image"] {
border: 2px solid;
}
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.