Sunday, August 31, 2014

The introduction of the <picture> tag

Chrome 38 is introducing extensions to HTML5. Welcome the <picture> tag. The tag will allow a simpler and more elegant way of sending multiple versions of a graphic, making responsive design that much easier to implement.
<picture>
    <source media="(min-width: 45em)" srcset="large.jpg">
    <source media="(min-width: 32em)" srcset="med.jpg">
    <img src="small.jpg" alt="">
</picture>
It's also introducing some new ES6 feature- which will make storing and interacting with data simpler.

2 comments: