HTML 5 came into existence, videos could only be played in a browser using a plugin like flash. But after the release of HTML 5, adding a video to a webpage is as easy as adding an image. The HTML5 “video” element specifies a standard way to embed a video on a web page.
Syntax:
<video src=”” controls> </video>
Attributes:
Autoplay : It tells the browser to immediately start downloading the video and play it as soon as it can.
Preload : It intends to provide a hint to the browser about what the author thinks will lead to the best user experience.
Loop : It tells the browser to automatically loop the video.
Height : It sets the height of the video in CSS pixels.
Width : It sets the width of the video in CSS pixels.
Controls : It shows the default video controls like play, pause, volume, etc.
Muted : It mutes the audio from the video.
Poster : It loads an image to preview before the loading of the video.
Src : It is used to specify the URL of the video file.