re: 10 HTML Elements You Didn't Know You Needed VIEW POST

TOP OF THREAD FULL DISCUSSION
re: I would avoid using the picture element in 2019. It's mostly a remanent from the first responsive images implementation. img now also has access to...
 

Yeah, came here to say the same thing – img srcset is supported everywhere, already gives you correct fallback "for free" (since you still declare a src attribute for that purpose), and provides all of the CSS query selector stuff in a much more compact, easily-parsed and easily-generated format. For example, the article's code would be captured as <img src="img_kitten.jpg" alt="Kitten" srcset="img_cat_fat.jpg 650w, img_cat_fluffy.jpg 465w">

code of conduct - report abuse