Member-only story
HTML — Part-7
3 min readMay 10, 2022
HTML Multimedia
Multimedia on the web is sound, music, videos, movies, and animations.Multimedia elements (like audio or video) are stored in media files. The most common way to discover the type of a file, is to look at the file extension.
There are many video and audio formats out there.The MP4, WebM, and Ogg formats are supported by HTML for the video and Only MP3, WAV, and Ogg audio are supported by the HTML standard.
HTML Video
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
- The
controls
attribute adds video controls, like play, pause, and volume. - If height and width are not set, the page might flicker while the video loads.
- The
<source>
element allows you to specify alternative video files which the browser may choose from. The browser will use the first recognized format.
HTML <video> Autoplay
To start a video automatically, use the autoplay
attribute
<video width="320" height="240" autoplay>
HTML <video> muted
<video width="320" height="240" autoplay muted>
Here, video start playing automatically (but muted).
HTML Audio
<audio controls>
<source…