+ 1
How can I embed a video from my computer (iMac) on to a HTML code?
21 Respuestas
+ 2
Hi
you may use the <video> tag to embed videos in HTML...
https://www.w3schools.com/html/html5_video.asp
As a side note, if you want to have the video be available online, you’ll have to upload video file to your web server. you may even upload to a service like youtube and embed that into your web page.
+ 3
lol. ok. share your code please. copy and paste it here 😊
+ 2
Umair Salam l so for example I have a MP4 video on my computer what should I do in order to have it on my code(is it possible to put a video without uploading it online)?
+ 2
Is your HTML code for a website accessible online or is it for local development only on your iMac?
So, if you’d like to publish the video on a website for the world to access you’ll need to upload it. if its just for you, then no.
hope this makes sense :)
+ 2
Check the link i posted above. And take the HTML course here on SoloLearn :)
here’s some sample code from the link i provided...
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
+ 2
you’re welcome 😊 did it work?
+ 2
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<video width="320" height="240" controls>
<source src="581512571.mp4" type="video/mp4">
</video>
</body>
</html>
lol I just realized that maybe it's because of the width and height but maybe not...
+ 2
Looks good. you can try without the width & height parameters if you like.
is the video file in the same folder as the HTML file? double-check the file name/extension.
+ 2
ok I figured it out!! thank you very much Umair Salam!
😊😊😊
+ 2
sweet. congratulations if it worked 👌🏻
+ 2
yeah it works perfectly!
🙌👌👌👌👌
+ 2
👏🏻 bravo
+ 2
thanks Umair Salam and good night! 🌃💤
+ 1
Umair Salam it's for local development only on my iMac (and thank you)
+ 1
Umair Salam so how do I do it?
+ 1
Umair Salam I know I have to use the <video> tag but how?
+ 1
Umair Salam thank you!!^_^
+ 1
Umair Salam I will check now
+ 1
Umair Salam it doesn't work..😐
+ 1
how can I make a video file in the same folder as my html file?