video

 <video>

The <video> tag is supported in all major browsers (in Internet Explorer:  from version 9).


Definition and Usage

The <video> tag specifies video, such as a movie clip or other video streams.


Differences Between HTML 4.01 and HTML5

The <video> tag is new in HTML5.


Tips and Notes

Tip: Any text between the <video> and </video> tags will be  displayed in browsers that do not support video.


Optional Attributes

New : New in HTML5.

AttributeValueDescription
autoplay     New autoplay Specifies that the video will start playing as soon as it is ready
controls      New controls Specifies that video controls should be displayed (such as a play/pause button etc).
height        New pixels Sets the height of the video player
loop           New loop Specifies that the video will start over again, every time it is finished
muted        New muted Specifies that the audio output of the video should be muted
poster        New URL Specifies an image to be shown while the video is downloading, or until the user hits the play button
preload      New auto metadata none Specifies if and how the author thinks the video should be loaded when the page  loads
src            New URL Specifies the URL of the video file
width          New pixels Sets the width of the video player

Global Attributes

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


Event Attributes

The <video> tag also supports the Global Event Attributes in HTML5.

More in this category: « embed details »