How to insert Video in HTML
> First you create one folder inside that you put any video from your local system but try it support mp4 format .
> Create index.html file
=====================index.html=========================
<!----
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
@author: ananddw
-->
<!DOCTYPE html>
<html>
<body>
<video width="1000" controls>
<source src="Ariana Grande, The Weeknd - Love Me Harder.mp4" type="video/mp4">
<source src="Ariana Grande, The Weeknd - Love Me Harder.mp4" type="video/ogg">
</video>
<p>
<a href="http://learnjavabyanand.blogspot.in/" target="_blank">Click here on Enter on Java World</a>.
</p>
</body>
</html>
> Create index.html file
=====================index.html=========================
<!----
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
@author: ananddw
-->
<!DOCTYPE html>
<html>
<body>
<video width="1000" controls>
<source src="Ariana Grande, The Weeknd - Love Me Harder.mp4" type="video/mp4">
<source src="Ariana Grande, The Weeknd - Love Me Harder.mp4" type="video/ogg">
</video>
<p>
<a href="http://learnjavabyanand.blogspot.in/" target="_blank">Click here on Enter on Java World</a>.
</p>
</body>
</html>
===============================================================
Run This file on your browser you will able to play any video through html code
Comments
Post a Comment