Skip to content

Instantly share code, notes, and snippets.

@coderbyheart
Forked from anselmh/imgtag.html
Created January 24, 2012 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderbyheart/1669458 to your computer and use it in GitHub Desktop.
Save coderbyheart/1669458 to your computer and use it in GitHub Desktop.
The New Img Tag (evolved)
<img src="large-default-file.jpg" media="screen and (min-width:601px)" alt="this is alternative text for default file" title="this is title for default file">
<source src="smaller.jpg" media="screen and (max-device-width:600px)" alt="this is alternative text for smaller file" title="this is title for smaller file">
<source src="tiny.jpg" media="screen and (max-device-width:320px)" alt="this is alternative text for tiny file" title="this is title for tiny file">
<source src="monochrome.jpg" media="monochrome" alt="this is alternative text for monochrome file" title="this is title for monochrome file">
</img>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment