The “source” tag in HTML is used inside “video”, “audio” or “picture” element to provide multiple media resources for different devices or screen sizes. The browser will choose the most suitable source according to the current environment.
Here’s an example of how “source” tag can be used in HTML:
For Video:
```
```
For Audio:
```
```
For Picture:
```
```
If the browser does not support the source tag, the text between the video tags will be displayed.
Please note, the text used “Your browser does not support the song.” can be replaced with any text that conveys the purpose of your webpage.
For each `
In the picture tag, `media` attribute is used to specify what media/device the linked resource is optimized for.
The browser will use the first recognized format in the order they are listed in.