---
title: "Use Video Player in HTML5"  
description: "Videos can be embedded in HTML pages with several methods.  Code to add Video player using HTML5                  The  tag defines a container for ext"  
author: "Abhishek Singh"  
published: 2014-01-20  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/634/use-video-player-in-html5  
category: "html5"  
tags: ["html5"]  
reading_time: 1 minute  

---

# Use Video Player in HTML5

Videos can be [embedded](https://www.mindstick.com/articles/332094/what-is-embedded-software-engineering) in HTML pages with several methods.\
Code to add Video player using HTML5\

```
<video width="320" height="240" controls>  <source src="movie.mp4" type="video/mp4">  <source src="movie.ogg" type="video/ogg">  <source src="movie.webm" type="video/webm">  <object data="movie.mp4" width="320" height="240">    <embed src="movie.swf" width="320" height="240">  </object> </video>
```

\

The <embed> tag defines a [container](https://www.mindstick.com/forum/159610/how-to-connect-a-windows-container-to-a-service-running-on-localhost) for [external](https://www.mindstick.com/articles/12810/how-to-connect-tablet-to-external-monitor-or-flat-screen-tv-using-computer-adapters) (non-HTML) content.

The following HTML [fragment](https://www.mindstick.com/forum/12894/how-to-force-recreation-of-activity-fragment-on-restore) displays a Flash video embedded in a [web page](https://www.mindstick.com/forum/718/sql-server-report-alignment-to-center-of-web-page):

<embed src="intro.swf" height="200" width="200">

\

##### Problems

- If the [browser](https://www.mindstick.com/blog/155254/which-is-the-best-internet-browser) does not [support Flash](https://answers.mindstick.com/qa/97380/do-the-ipad-models-support-flash), the video will not play

- iPad and iPhone do not support Flash videos\

The HTML5 <video> tag defines a video or movie.

The <video> element works in all modern browsers.

The following example uses the HTML5 <video> tag, which specifies one

MP4 file (for [Internet](https://www.mindstick.com/articles/44650/what-should-you-do-during-an-internet-outage) [Explorer](https://www.mindstick.com/forum/34658/want-to-developed-windows-explorer-without-using-telerik), Chrome, Firefox 21+, and Safari), and one OGG

file (for older Firefox and Opera). If something fails, it will display a text:

##### Problems:

- You must convert your videos to many different formats

- The <video> element does not work in older browsers

---

Original Source: https://www.mindstick.com/blog/634/use-video-player-in-html5

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
