+ 4

How to put a YouTube video inside a webpage?

I tried using the iframe tag only and it said the connection with YT was refused, besides even the pic i tried inserting (which is in the same folder) only opens when i open the HTML on certain programs, Google doesn't open it tho. https://code.sololearn.com/WpmSJd02kqcl/?ref=app

21st Apr 2019, 9:35 AM
Grasshopper Hell Monkey
Grasshopper Hell Monkey - avatar
4 Answers
+ 20
You have to use the Youtube Id if you want a youtube video to be played on your webpage. In your code, you are directly inserting the link of the video which will not give the desired result. You can refer the below link : https://www.w3schools.com/html/html_youtube.asp
21st Apr 2019, 10:05 AM
Nova
Nova - avatar
+ 36
You Would Easily Find Your Answer In This Code!!!šŸŒ¹šŸ‘šŸ˜šŸ¤—šŸ˜ŠāœŒšŸŒ¹ ā¬‡ļøā¬‡ļøā¬‡ļø https://code.sololearn.com/W2V0quvQYyGV/?ref=app
21st Apr 2019, 4:50 PM
KĶœĶ”É©nÉ¢ćƒ»ļ¾‘ļ½šiļ½ši šŸ–¤
KĶœĶ”É©nÉ¢ćƒ»ļ¾‘ļ½šiļ½ši šŸ–¤ - avatar
+ 4
Maybe its help and give you some idea. Html5 now can provide video with tag <video width=".." height=".."> <source src=".." type="video/mp4"> <source src=".." type="video/ogg"> </video> If the browser doesnt support mp4 type then it will run the ogg type. for your image set it to height:auto;width:100%;
21st Apr 2019, 10:11 AM
Andri Hry
Andri Hry - avatar
0
On a computer, go to the YouTube video or playlist you want to embed. Click SHARE Share. From the list of Share options, click Embed. From the box that appears, copy the HTML code. Paste the code into your website HTML. http://net-informations.com/q/mis/youtube.html
19th Oct 2021, 4:48 AM
creigmalta