Collection of references for web development.

HTML source tag


The HTML <source> element represents multiple media resources for the <audio>, <picture>, or <video> element.


Attribute Value Description
media Operators: and|not|,
Devices: all, print, screen, speech
Values: aspect-ratio, color, color-index, grid, height, monochrome, orientation, resolution, scan, width
Specifies the media type for which the element or the document is designed for.
sizes list Specifies image sizes for different document sizes.
src URL The URL of the file to embed in the document.
srcset list Specifies a list of resources to be used for different conditions.
type MIME type Specifies the media type for the URL.


	<source media="(min-width: 600px)" srcset="">
	<source media="(min-width: 300px)" srcset="">
	<img src="" alt="Placeholder">