Audio and Video tags in HTML

Audio Tag:

The <audio> element is used to embed audio content in an HTML document, such as music or other audio streams. It may contain one or more audio sources.

There are three supported audio formats in HTML: MP3, WAV, and OGG.

It can be customized with various attributes, such as src (to specify the location of the audio file), controls (to display playback controls), and loop (to repeat the audio).

Here is an example of how to use the <audio> element to embed an audio file in an HTML document:

<audio src="/audio/my-song.mp3" controls loop></audio>

Video Tag:

The <video> element is used to embed video content in an HTML document, such as a video clip or other video streams.

There are three supported video formats in HTML: MP4, WebM, and OGG.

It can be customized with various attributes, such as src (to specify the location of the video file), controls (to display playback controls), and loop (to repeat the video).

Here is an example of how to use the <video> element to embed a video file in an HTML document:

<video src="/video/my-movie.mp4" controls loop></video>