HTML Video

The HTML <video> tag is used to embed a media player which supports video playback into the website.

Video Breakdown

Here is the breakdown of HTML Video.

Video Attributes

Attribute Description
src It specifies the URL
width It specifies the width
autoplay It specifies that the video will play automatically
controls It specifies that the video controls get displayed
height It specifies the height
loop It specifies that the video will start again every time after finish
muted It specifies that the audio should be muted
poster It specifies the image to be shown while the video is downloading
preload It specifies how and when the video file should load

Video Example

Below example will demonstrate the basic architecture of HTML Video.

<!doctype html>  

        <title>HTML Comment Example</title>
        <video controls>
            <source src="intro.webm" type='video/webm;codecs="vp8, vorbis"'/>