HTML Media
- These are the elements which allow you to include images, audio files, videos, and other multimedia elements within your HTML documents.
- Multimedia files have formats and different extensions like: .wav, .mp3, .mp4, .mpg, .wmv, and .avi.
Here are HTML media elements:
1- HTML Video
- HTML video element is used to show the video on the web page.
- For this video tag is used.
Example:
How it Works
a) Controls:
- With the help of control you can add play, pause and volume.
b) Height:
- It is used to set the height of the element.
c) Width:
- It is used to set the width of the element.
d) source:
- It allows you to provide multiple sources for the media content, allowing the browser to choose the most appropriate source based on its supported formats.
Add muted after autoplay to your video to start playing video automatically but the video will be muted.
Example:
π Try it yourself! Click the button below to run the code and see the output in action.
HTML Code
Output
Upar wale code pe src pe apne video ka path laga kr check karo ππ€ͺ
2- HTML Audio
- HTML video element is used to show the audio file on the web page.
- For this audio tag is used.
Example:

How it Works
a) Controls:
- With the help of control you can add play, pause and volume.
b) source:
- It allows you to provide multiple sources for the media content, allowing the browser to choose the most appropriate source based on its supported formats.
Add muted after autoplay to your video to start playing video automatically but the video will be muted.
Example:

π Try it yourself! Click the button below to run the code and see the output in action.