In This article, we will define how to add video content using a <video> element in the document. Before HTML5 came into existence, videos could only be played in a browser using a plugin like flash, but after the release of HTML5, adding a video to a web page is easy as adding an image. The HTML5 “video” element specifies a standard way to embed a video in a web page. There are three different formats that are commonly supported by web browsers – mp4, Ogg, and WebM. The table below lists the formats supported by different browsers:
Syntax:
<video src="" controls></video>
Example:
<!DOCTYPE html> <html> <head> <title> Define a Video or move? </title> </head> <body> <h2> GeeksForGeeks </h2> <h2> HTML5: How to define a Video or Movie? </h2> <p> Adding Video on my webpage <p> <video width="400" height="350" controls> <source src="myvid.mp4" type="video/mp4"> <source src="myvid.ogg" type="video/ogg"> </video> </body> </html> |
Output:

Supported Browsers:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML5 | Video
- How to Add a Short Quotation using HTML5 ?
- How to add footer for a document or section using HTML5 ?
- HTML5 | Audio
- How to change the font of HTML5 Canvas using a button in Angular.js?
- HTML5 Game Development | Infinitely Scrolling Background
- HTML5 | Mathematical operators
- HTML5 | MathML <menclose> Tag
- HTML5 | <footer> Tag
- HTML5 | Semantics
- HTML5 | <details> tag
- HTML5 | <aside> Tag
- HTML5 | <dialog> Tag
- Difference between HTML and HTML5
- HTML5 | article tag
- HTML5 | <meter> Tag
- HTML5 | date attribute in <input> Tag
- Change an HTML5 input placeholder color with CSS
- HTML5 | mark Tag
- HTML5 | fieldset Tag
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


