<source> : Video or Image Source element

Introduction

The <source> element in HTML is used as a child of media elements like <audio> and <video>, as well as the <picture> element for responsive images. It specifies multiple media resources for the browser to choose from, allowing for better compatibility and optimization across different devices and browsers.

Here’s an example:

#.Within <audio> or <video> elements:

Outout:

In this example we give a source of video and it will display on the webpage. As well as we can make for picture.

Leave a Comment