+ 1
Adding Videos
How do you add a video to your project [ HTML/CSS/JavaScript ]
4 Respuestas
+ 1
You can add a video using only HTML, with the next code
<video controls>
<source src="./your-video.mp4" type="video/mp4">
You browser doesn't support videos :(
</video>
The control attribute, show to user the basic controls (play/pause and not much more) and the empty <source> tag is used to add the video's file
You can add multiple <source> tags with the same video in several formats
+ 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Video Example</title>
</head>
<body>
<h1>My Video Project</h1>
<!-- Embedding a video using the video tag -->
<video controls>
<source src="path/to/your-video.mp4" type="video/mp4">
<source src="path/to/your-video.webm" type="video/webm">
Your browser does not support the video tag.
</video>
</body>
</html>
+ 1
Thanks
0
Just use video tag. <video></video>