Description

The <video> element is used to embed video content in an HTML document without requiring any additional plugin like Flash player. Support for the <video> element varies accross browsers. At the moment, there are three main video formats that is supported for the video element: MP4, Ogg and WebM.

This element is intended as a way to encode dates and times in a machine-readable format, so that user agents can offer to add event reminders such as birthdays and anniversaries, or any event scheduling for user's calendar.

The following table summarizes the usages context and the version history of this tag.

Placement:Block
Content:<source>, <track>, and text
Start/ End Tag:Start tag: required, End tag: required
Version:HTML 5

Syntax

The basic syntax of the <video> tag is given with:

HTML/XHTML: <video> ... </video>

The example below shows the <video> tag in action.

<video controls="controls" src="shuttle.mp4">
    Your browser does not support the HTML5 Video element.
</video>

A video, using the browser default set of controls, with alternative sources.

<video controls="controls">
    <source src="shuttle.mp4" type="video/mp4">
    <source src="shuttle.ogv" type="video/ogg">
    Your browser does not support the HTML5 Video element.
</video>

Tip: You can place content such as text or download link inside a video element to provide alternate content in case, if the browser does not support the video content or somehow failed to download the video source file.

Tag-Specific Attributes

The following table shows the attributes that are specific to the <video> tag.

Global Attributes

Like all other HTML tags, the <video> tag supports the global attributes in HTML5.

Event Attributes

The <video> tag also supports the event attributes in HTML5.

Browser Compatibility

Element
<video>YesYesYesYesYes