+ 1

Adding Videos

How do you add a video to your project [ HTML/CSS/JavaScript ]

15th Aug 2024, 4:32 PM
King Socrates
King Socrates - avatar
4 Answers
+ 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
15th Aug 2024, 6:28 PM
Luis
Luis - avatar
+ 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>
17th Aug 2024, 7:29 AM
ì°Źì—ëŒ
ì°Źì—ëŒ - avatar
0
Just use video tag. <video></video>
15th Aug 2024, 5:14 PM
Hayk Mkrtchyan
Hayk Mkrtchyan - avatar
0
Thanks
21st Aug 2024, 2:14 PM
King Socrates
King Socrates - avatar