New in HTML5.

<source> HTML Tag

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more

Sharing is caring!

Element of
Every Way Possible To Embed Modern Media With HTML Code
What does <source> HTML Tag do?
The <source> element is used as a child of a <picture>, <audio>, or <video> element, and identifies the URL of one or more media resources. The <source> element is commonly used to add media resources in multiple formats for the best possible cross-browser compatibility.
Display
inline
Null element
This element must not contain any content, and does not need a closing tag.
Usage
semantic

Alternate Sources

The purpose of <source> is to define multiple versions of a file, so you can specify different versions for different browsers or platforms. You can use <source> within either <audio>, <track> or <video> elements.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.

Browser Support for source