Explore 100's Of Free Video Tutorials

Keep Learning, Keep Coding & Keep Sharing

HTML5 video tag Part 1

Notes:

HTML5 video tag - Part 1:

Before html5 to play video files, user need to install player plugins like flash player or any other equivalent player in browsers. Which would take more storage and extra resources.
Also almost all of the mobile platforms dont support flash player now days hope you know that.

Then whats the solution to these problem?
How do we let users to play video files on any platform without depending on plugins?
The solution is HTML5 video tag.
Almost all modern browsers of almost all platforms support HTML5 video tag.
Now using HTML5 video tag user can play video files without installing any plugins.
Because videos are directly played by browsers. Hence need not to depend on plugins.

video tag is a paired and inline level tag.
attributes:
src : accepts source video to be played (mp4,m4v,mov,ogv,webm)
autoplay : used to control auto play behavior of a video
controls: add video controlls at the bottom of video.

Interview Questions:

1. HTML video tag has ________ attribute to control autoplay behavior of a video on load of a page?
a. autostart
b. autoplay
c. controls
d. poster
Answer: b