Really like the picture element idea
Posted on:As the subject says, I think the <picture> element is a great idea and to have it follow a similar pattern to the <video> and <audio> elements make sense.
One small change which I think would make more sense from a readability point of view would be rename the attribute ‘srcset’ to just ‘set’. In its current suggestion the source attribute reads ‘source source set’
e.g.
<source srcset=”small-1.jpg 1x, small-2.jpg 2x”>
However in the way I have suggested it would read as ‘source set’ and look like the following:
e.g.
<source set=”small-1.jpg 1x, small-2.jpg 2x”>
Although very minor, but I think it reads much nicer.