How to Embed Video in HTML5

HTML5 is basically an advanced version of HTML, but it is still under development. In this tutorial we will learn about embedding video in html5.

Step # 1 – Basic Code

The following code can be used to understand how video in html5 is embedded.

The control keyword is used to add the playback controls like volume, pause and play.

The width and height of the video frame can also be defined

Basic Video Code

Step # 2 – Text within Video Element

A message can be shown in case the video is not supported by the browser.

Text within Video Element

Step # 3 – Multiple Video Sources

We can also provide multiple sources of the video through the <source> element.

Multiple Video Sources

And this is how we can embed video in html5.