HTML5: Playing video

This entry is part 33 of 34 in the series HTML5

HTML5 supports video tag to play video files but because of the different format of videos and browsers, not all formats are supported and I managed only to try out ogg video files.

Ogg video files can be played in Chrome and Firefox browsers.

<!DOCTYPE html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title>Sample Video</title>
<video controls autoplay src=''></video>

In the above video tag, I have put the video in autoplay so that once the browser is loaded, the video will play immediately.

The controls have been added to the player as well.

Series Navigation<< HTML5: Styling a form
HTML5: Playing audio files >>