I have a table with some images that I want to start out with no images in them.I have set the src="".But when viewed in a browser it shows broken image pics.
<tr>
<td><img src=""> </td>
<td><img src=""> </td>
<td><img src=""></td>
</tr>
How can I prevent the browser from showing the broken image pics or X or whatever until I put some data into the src attribute.
Don't use images that point to nothing.
You could style them to have no visibility (will not work if you have anything in the src
attribute, even if it is a bad URL):
img[src='']
{
display: none;
}
But as I already said, if you don't have an image do display, don't put the tag on the page.
Very simple answer is add alt attribute with empty value
<img src="" alt="" width="50" height="50"/>
width & height are optional
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With