I have a website with an image slider. I keep some image tags blank when images load, when a slide appears in view for faster page loading. Image tags are defined as follows:
<img data-src="img/portfolio-desktop1-small.png" src="" alt=""/>
What I'm doing is a slide function. I change srcto data-srcjQuery animation. The slider works great. My problem is that when I try to check it in the w3c validation tool , it gives the following error:
Line 131, Column 179: Bad value for attribute srcfor element img: must be non-empty.
...data-src="img/portfolio-desktop1-small.jpg" src="" alt=""/>
URL Syntax:
Any URL. For example: /hello, #canvasor http://example.org/. > Symbols must be represented in NFC, and spaces must be escaped as %20.
Is there a way to fix this without modifying JavaScript or CSS? If I leave it this way, what could be the possible harmful consequences of this question?
source
share