0

How to add a video to an HTML code?

I have tried a lot and the videos don't work, I added videos from YouTube and Chrome and it doesn't work This is the code I tried. <video controls> <source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" type="video/mp4"> Video Not Supported </video> And yes I heard I can use <iframe> but I haven't reached there yet and I just would like to learn this one first.

20th Mar 2025, 1:25 PM
Rondell Nagassar
Rondell Nagassar - avatar
5 Answers
+ 1
did you try: <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> it in this way? (source: w3schools)
20th Mar 2025, 6:32 PM
Mihaly Nyilas
Mihaly Nyilas - avatar
0
Thank you so much but I'm new so no I didn't try it sorry.
20th Mar 2025, 10:01 PM
Rondell Nagassar
Rondell Nagassar - avatar
0
Why not trying an embedded link, like you would for say a youtube video? but instead of setting it to "https://example.com", you set it to "file://internal storage/some folder/example.mp4"?
20th Mar 2025, 10:12 PM
Procoder617
Procoder617 - avatar
0
Thank you also
20th Mar 2025, 11:06 PM
Rondell Nagassar
Rondell Nagassar - avatar
0
I think it's better to download any video you wish to use in your website. Use Vidmate to download YouTube videos
21st Mar 2025, 9:48 AM
~Nhm~
~Nhm~ - avatar