I am loading a background image for a webpage through CSS. This allows me to load a different sized image based on viewport width, to help the page load speed on mobile/tablet.
<img id="backimage">
The only issue with this is that it creates the following W3C validation errors (the only errors I have and the client specifically wants the page to validate):
Error Line 6, Column 8: required attribute "TYPE" not specified
<script>The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are
type="text/css"for<style>andtype="text/javascript"for<script>.Error Line 39, Column 24: required attribute "SRC" not specified
<img id="backimage">The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are
type="text/css"for<style>andtype="text/javascript"for<script>.