[whatwg] add html-attribute for "responsive images"

Bronislav Klučka Bronislav.Klucka at bauglir.com
Wed Feb 8 02:40:40 PST 2012



On 8.2.2012 11:24, David Goss wrote:
> I share your skepticism. It would be nice and neat if there was a 
> <media> element with a common structure for images, video and audio, 
> but clearly the <video> and <audio> elements are too well established 
> already. No sense in rocking that boat now. 

This could always be introduces specifically for responsive media

<media alt="My new cool car">
<source src=my_cool_car.ogg" type="video/ogg" media="min-width: 200px" />
<source src=my_cool_car.mp4" type="video/mp4" media="min-width: 200px" />
<source src=my_cool_car_small.ogg" type="video/ogg" media="max-width: 
200px" />
<source src=my_cool_car_small.mp4" type="video/mp4" media="max-width: 
200px" />
<source src="my_cool_car.png" media="min-width: 200px" />
<source src="my_cool_car_small.png" media="max-width: 200px" />
<img src="my_cool_car_fallback.gif" alt="My new cool car" />
</media>

Brona



More information about the whatwg mailing list