<source> tag in HTML
The <source> tag allows authors to provide different versions of a file in media elements (audio and video) and pictures.
A media element or picture can contain one or more source elements, each of which provides a different version of the media or picture.
<source> tag should be given under the following elements only.
- <audio> tag
- <video> tag
- <picture> tag
In the below two examples we have given three files in different formats with same content, the browser checks the file format in order and execute the corresponding file.