HTML Video tag

  • Videos can be played in HTML by using <video> element.
  • you have to simply use the given statement for this purpose:
<video width="500" height="400" controls="controls">
<source src="Hai Preet Jahan Ki Reet.mp4" type="video/mp4" />
The following example plays an MP4 video by using
<!DOCTYPE html>
<html>
<body>
<video width="500" height="400" controls="controls">
<source src="Hai Preet Jahan Ki Reet.mp4" type="video/mp4" />
</object>
</video>
</body>
</html>
Visit Try Yourself Editor