<video>: The HTML Video Element
1 Description
The HTML <video>
element is used when you would
like to embed a video into a webpage. You can specify several
different <source>
elements for the video, generally
each <source>
is a different resolution allowing
the user to select which resolution/quality they of the video
they would like to watch.
The video file must be either a mp4 file or webm file. Other video file types may not play correctly in web browsers.
2 Examples
<!DOCTYPE html>
<html>
<head>
<title>Example Page</title>
</head>
<body>
<h1>Example HTML Page</h1>
<p>This html page has an embedded video element.</p>
<video>
<source src="/video/sample_video_1.mp4" type="video/mp4"/>
<source src="/video/sample_video_2.webm" type="video/webm"/>
</video>
</body>
</html>
This document was last updated: