How do I put a YouTube video in the HTML document using the <iframe> tag and set the X-frame-option to make the video play | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 2

How do I put a YouTube video in the HTML document using the <iframe> tag and set the X-frame-option to make the video play

25th Jun 2017, 10:31 PM
Tumelo Letsoalo
Tumelo Letsoalo - avatar
3 Antworten
+ 1
Copy the video link from the browser then paste it to your code. then replace the "watch?v=" with the "embed". example of how it should look like: <video controls> <source src="https://www.youtube.com/embed/Dlh5uDejkHw" type="video/mp4"> <source src="https://www.youtube.com/embed/Dlh5uDejkHw" type="video/ogg"> </video> Thats my trick, If it won't work tell me
25th Jun 2017, 11:56 PM
Raz
Raz - avatar
+ 2
both the <iframe> and the <video> tags work when instilling a video
1st Jul 2017, 8:08 PM
Tumelo Letsoalo
Tumelo Letsoalo - avatar
+ 1
By using HTML5 features, that is by using VIDEO element,,,
25th Jun 2017, 11:06 PM
Nura Programmer
Nura Programmer - avatar