Google Ads

HTML5 Video Player HTML Code


Here is HTML5 Video Player HTML Code.

Playing Videos in HTML

Before HTML5, a video could only be played in a browser with a plug-in (like flash).

The HTML5 <video> element specifies a standard way to embed a video in a web page.

This code will work for Android, Windows, iPhone and more devices which supports html.

<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
 
or
 
<video width="320" height="240" controls>
<source src="http://domain.com/movie.mp4" type="video/mp4">
<source src="http://domain.com/movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

How it Works

The controls attribute adds video controls, like play, pause, and volume.

It is a good idea to always include width and height attributes. If height and width are not set, the page might flicker while the video loads.

The <source> element allows you to specify alternative video files which the browser may choose from. The browser will use the first recognized format.

The text between the <video> and </video> tags will only be displayed in browsers that do not support the <video> element.

 

 

Have any Question or Comment?

One comment on “HTML5 Video Player HTML Code

Leave a Reply

Your email address will not be published. Required fields are marked *