Understanding HTML Video Tag

Explained in detail

Understanding HTML Video Tag

The HTML tag is used for streaming video files such as a movie clip, song clip on the web page.

Currently, there are three video formats supported for HTML video tag:

  1. mp4

  2. webM

  3. ogg

Let's see the table that defines which web browser supports video file format.

image.png

HTML Video Tag Example

Let's see the code to play a mp4 file using HTML video tag.

image.png

Let's see the example to play an ogg file using HTML video tag.

image.png

Supporting Browsers

image.png

Attributes of HTML Video Tag

Let's see the list of HTML 5 video tag attributes.

image.png

HTML Video Tag Attribute Example

Let's see the example of video tag in HTML where are using height, width, autoplay, controls and loop attributes.

image.png

MIME Types for HTML Video format

The available MIME type HTML video tag is given below.

image.png

Follow me Twitter for more content on web development and personal growth.