Home » HTML » HTML Video

HTML Video

Before HTML5, a HTML Video must be played in a browser with a module (like blaze). The HTML5 <video> component determines a standard way to install a video in a page.

HTML Video:-

To demonstrate a video in HTML, utilize the <video> component:


<video width=”420″ height=”300″ controls>
  <source src=”VideoURL” type=”videoType”>
  <source src=”VideoURL” type=”videoType”>

How it Works:-

The controls attributes includes video controls, similar to play, pause, and volume. It is a smart thought to dependably incorporate width and height characteristics. In the event that height and width are not set, the page may flash while the video loads. The <source> element enables you to indicate elective video documents which the browser may look over. The browser will use the first recognized format. The content between the <video> and </video> labels might be shown in browser that don’t bolster the <video> component.

<video> Autoplay:

To start a video automatically use the autoplay attribute:-


<video width=”420″ height=”300″ autoplay>
  <source src=”VideoURL” type=”videoType”>
  <source src=”VideoURL” type=”videoType”>

Browser Support

In HTML5, there are 3 supported video formats: MP4, WebM, and Ogg. The browser support for the different formats is:

Browser MP4 WebM Ogg
Internet Explorer YES NO NO
Safari YES NO NO
Opera YES (from Opera 25) YES YES

Media Types

File Format Media Type
MP4 video/mp4
WebM video/webm
Ogg video/ogg

Methods, Properties, and Events

HTML5 defines DOM methods, properties, and events for the <video> element. This allows you to load, play, and pause videos, as well as setting duration and volume.  There are also DOM events that can notify you when a video begins to play, is paused, etc.

Video Tags

Tag Description
<video> Defines a video or movie
<source> Defines multiple media resources for media elements, such as <video> and <audio>
<track> Defines text tracks in media players

You Can Also Check Full DOM Reference By Visiting This HTML Audio/Video DOM Reference.

, , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *


error: Sorry You Have Not Permission To Copy!