Login
Your Email
Pasword
Home
Write
Trending
History
Liked
Earning

How to play video in HTML?

Before HTML5 a video could only be played in a browser with a plug-in .

Do you have similar website/ Product?
Show in this page just for only $2 (for a month)
Create an Ad
0/60
0/180

The HTML5  <video>  element specifies a standard way to embed a video in a web page.
HTML <video> Element
<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> 

How it Works?
The controls attribute adds video controls, like play, pause, and volume.
The <source> 
The text between the <video> and </video> tags will only be displayed in browsers that do not support the <video> element.
Autoplay HTML <video>
<video width="320" height="240" autoplay>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>

HTML Video - Methods, Properties, and Events
HTML5 defines DOM methods, properties, and events for the  <video> element.
This allows to load, play, and pause videos, as well as setting duration and volume.

CONTINUE READING
play video
HTML
Multimedia
Ayesha
Tech writer at newsandstory