When querying an API that may or may not have an image, what are the main differences in setting the background-image
or actually creating an img
tag?
<div class="img" style="background-image:url(...)"></div>
vs
<div class="img"><img src="..." alt="#" /></div>