HTML Video
How to insert Video in HTML?
HTML video element is used to show a video on a web page.
Web video is a short, recorded, viewable file linked to a website or an electronic message to educate or transfer visual information from one user to another.
The HTML Video Element
To show a video in HTML, use the video element:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Embedded Video</title>
<style>
body {
font-family: 'Arial', sans-serif;
text-align: center;
margin-top: 50px;
font-size: 18px;
}
video {
width: 70%;
display: block;
margin: auto;
margin-top: 20px;
border: 2px solid #3498db; /* Blue color for video border */
border-radius: 5px;
}
</style>
</head>
<body>
<video width="600" height="400" controls>
<source src="video/foreverinlove.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</body>
</html>