HTML 5 <video> Tag
Example
A simple HTML5 video:
<video src="movie.ogg" controls="controls">
your browser does not support the video tag
</video> |
View it » |
Definition and Usage
The <video> tag defines video, such as a movie clip or other video streams.
Differences Between HTML 4.01 and HTML 5
The <video> tag is new in HTML 5.
Tips and Notes
Tip: You can write text between the start and end tags, to show
older browser that they do not support this tag.
Optional Attributes
New : New in HTML 5.
Attribute |
Value |
Description |
autoplayNew |
autoplay |
If present, then the video will start playing as soon as it is
ready |
controlsNew |
controls |
If present, controls will be displayed, such as a play
button. |
heightNew |
pixels |
Sets the height of the video player |
loopNew |
loop |
If present, the media file will start over again, every
time it is finished. |
preloadNew |
preload |
If present, the video will be loaded at page load, and ready to run. Ignored if "autoplay" is present. |
srcNew |
url |
The URL of the video to play |
widthNew |
pixels |
Sets the width of the video player |
Standard Attributes
The <a> tag also supports the Standard Attributes in HTML 5.
Event Attributes
The <a> tag also supports the Event Attributes
in HTML 5.
|