Example 1
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Embedding Video into an HTML Page</title>
</head>
<body>
<video controls="controls" src="/videos/sample.mp4">
Your browser does not support the HTML5 Video element.
</video>
</body>
</html>
Example 2
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Specify Alternate Sources for video Element in HTML</title>
</head>
<body>
<video controls="controls">
<source src="/videos/sample.mp4" type="video/mp4">
<source src="/videos/sample.ogv" type="video/ogg">
Your browser does not support the HTML5 Video element.
</video>
</body>
</html>
Example 3
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Inserting Video Using object Element</title>
</head>
<body>
<object data="/videos/sample.mp4" width="400px" height="200px"></object>
</body>
</html>
Example 4
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Inserting Video Using embed Element</title>
</head>
<body>
<embed src="/videos/sample.mp4" width="400px" height="200px">
</body>
</html>
Example 5
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Embedding a YouTube Video in an HTML Page</title>
</head>
<body>
<iframe width="560" height="315" src="//www.youtube.com/embed/YE7VzlLtp-4" frameborder="0" allowfullscreen></iframe>
<p>Source: <a href="https://www.youtube.com/watch?v=YE7VzlLtp-4" target="_blank" rel="nofollow">https://www.youtube.com/watch?v=YE7VzlLtp-4</a></p>
</body>
</html>