Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems embedding youtube video

I am starting to get crazy with this code. It's so simple but it doesn't work and I can't understand why.

I am trying to embed a youtube video in a HTML page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
</head>

<body>
    <div style="font-family: 'NeubauGrotesk55Normal'; font-size: 32px; text-transform: uppercase; color: #0066b3; margin-left: 20px;">Add title</div>
    <div style="font-size: 16px; font-family: 'Georgia', 'Times New Roman', times, serif; color: #333333; margin-left: 20px; margin-top:20px;">Add text</div>

    <div style="margin-left: 20px; margin-top:20px;"><iframe width="853" height="480" src="//www.youtube-nocookie.com/embed/rzp7wHnX6jc?rel=0" frameborder="0" allowfullscreen></iframe></div>
</body>
</html>

Any idea?

Thanks!

like image 943
Net1 Avatar asked Feb 02 '26 09:02

Net1


2 Answers

Add http: in ... src="//www.youtube... -> ... src="http://www.youtube...

like image 70
Jens Teich Avatar answered Feb 05 '26 06:02

Jens Teich


you're missing http: on your YouTube link

like image 24
popdan Avatar answered Feb 05 '26 06:02

popdan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!