public
Last active

picture fallbacks (object, embed, img)

  • Download Gist
object_embed_fallback.html
HTML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>&lt;picture&gt; with different fallbacks</title>
</head>
<body>
<h1>&lt;picture&gt; with different fallbacks</h1>
<p>Don't forget to check which resources are loaded, regardless of what is displayed.</p>
 
<h2>Test 1: &lt;object&gt;</h2>
<picture alt="1a">
<source src="http://responsiveimages.org/img/logo.png" alt="1b">
<object type="image/jpeg" data="http://placekitten.com/600/220"></object>
</picture>
 
<ul>
<li>RICG logo = Support for &lt;picture&gt;</li>
<li>Kitten = Support for image in &lt;embed&gt; src</li>
<li>Nothing = No support</li>
</ul>
 
<h2>Test 2: &lt;embed&gt;</h2>
<picture>
<source src="http://responsiveimages.org/img/logo.png">
<embed type="image/jpeg" src="http://placekitten.com/600/221">
</picture>
 
<ul>
<li>RICG logo = Support for &lt;picture&gt;</li>
<li>Kitten = Support for image in &lt;embed&gt; src</li>
<li>Nothing = No support</li>
</ul>
 
<h2>Test 3: &lt;object&gt; and &lt;embed&gt;</h2>
<picture>
<source src="http://responsiveimages.org/img/logo.png">
<object type="image/jpeg" data="http://placekitten.com/600/222">
<embed type="image/jpeg" src="http://placekitten.com/600/223">
</object>
</picture>
 
<ul>
<li>RICG logo = Support for &lt;picture&gt;</li>
<li>Kitten = Support for image in &lt;embed&gt; src, within an &lt;object&gt;</li>
<li>Nothing = No support</li>
</ul>
 
<h2>Test 4: &lt;object&gt; and &lt;img&gt;</h2>
<picture>
<source src="http://responsiveimages.org/img/logo.png">
<object type="image/jpeg" data="http://placekitten.com/600/224">
<img src="http://placekitten.com/600/225" alt="kitten">
</object>
</picture>
 
<ul>
<li>RICG logo = Support for &lt;picture&gt;</li>
<li>Kitten = Support &lt;img&gt; within an &lt;object&gt;</li>
<li>Nothing = No support</li>
</ul>
 
<h2>Test 5: &lt;img&gt;</h2>
<picture>
<source src="http://responsiveimages.org/img/logo.png">
<img src="http://placekitten.com/600/226" alt="kitten">
</picture>
 
<ul>
<li>RICG logo = Support for &lt;picture&gt;</li>
<li>Kitten = Support &lt;img&gt;</li>
<li>Nothing = No support</li>
</ul>
 
</body>
</html>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.