Video Tag
Video Tag in HTML5
<video>tag are used to add video on web page. Html5 added new tag for add video files on web page, befor html5 it is achieve by using <embed> tag
Attributes of meter
Browser supported
video formats | | | | | |
mp4 | Yes | Yes | Yes | No | Yes |
webM | Yes | Yes | No | Yes | No |
ogg | Yes | Yes | No | Yes | No |
Example
<!DOCTYPE html>
<html>
<body>
<video controls>
<source src="/html5/images/movie.mp4" type="video/mp4">
</video>
</body>
</html>
Attributes of Video Tag
Atrribute | Description |
controls | Used to defines the video controls which is displayed with play/pause buttons. |
height | Used to set the height of the video player. |
width | Used to set the width of the video player. |
poster | Used to specifies the image which is displayed on the screen when the video is not played. |
autoplay | Used to specifies that the video will start playing as soon as it is ready. |
loop | Used to specifies that the video file will start over again, every time when it is completed. |
muted | Used to mute the video output. |
preload | Used to specifies the author view to upload video file when the page loads. |
src | Used to specifies the source URL of the video file. |
Html Video Tag media type
File Format | Media Type |
MP4 | video/mp4 |
WebM | video/webm |
Ogg | video/ogg |
Browser supported
Element | | | | | |
<video> | Yes | Yes | Yes | Yes | Yes |
Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet