HTML5 <video> Tag

Example

A simple HTML5 video:

<video src="video.mp4" controls="controls">
your browser does not support the video tag
</video>
Code it Online »

Definition and Usage

The <video> tag defines 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

Hint: Any text inside the between <video> and </video> will be displayed in browsers that does not support the video element.

Optional Attributes

Attribute Value Description
audio muted Specifies the default state of the the audio. Currently, only "muted" is allowed
autoplay autoplay If present, then the video will start playing as soon as it is ready
controls controls If present, controls will be displayed, such as a play button
height pixels Sets the height of the video player
loop loop If present, the video will start over again, every time it is finished
poster url Specifies the URL of an image representing the video
preload preload If present, the video will be loaded at page load, and ready to run. Ignored if "autoplay" is present
src url The URL of the video to play
width pixels Sets the width of the video player

Standard Attributes

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

Event Attributes

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


Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!