paris.us ............Views...54Home Page ........Comment(Login First)
View PHP File


How would I hotlink to this youtube video on my
html or php web page?

https://www.youtube.com/watch?v=E0WTUpGFcD8

🧱 If you just want to link to the YouTube video so it opens on YouTube:

HTML
<a href="https://www.youtube.com/watch?v=E0WTUpGFcD8" target="_blank">
Watch Video
</a>

Or in PHP:

PHP
<?php
$videoUrl = "https://www.youtube.com/watch?v=E0WTUpGFcD8";
echo '<a href="' . $videoUrl . '" target="_blank">Watch Video</a>';
?>

🧱 If you want to embed the video directly on your webpage, use the YouTube embed URL. The video ID is:

Plain Text
E0WTUpGFcD8
`
Embed code:

<html><head></head><body><center>

<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/E0WTUpGFcD8"
title="YouTube video player"
frameborder="0"
allowfullscreen>
</iframe>

</center></body></html>


embed.html

🧱 Embed 2 videos directly on your webpage

The 2 video embed code:

<html><head></head><body><center>

<iframe
width="330"
height="220"
src="https://www.youtube.com/embed/mY55qNSXhno"
title="YouTube video player"
frameborder="0"
allowfullscreen>
</iframe>

<iframe
width="330"
height="220"
src="https://www.youtube.com/embed/VpS2nxlIP0Y"
title="YouTube video player"
frameborder="0"
allowfullscreen>
</iframe>

</center></body></html>

embed2vids.html


🧱 For a full-screen responsive player that fills the browser window:

HTML
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
 
#player {
width: 100vw;
height: 100vh;
border: none;
}
</style>
</head>
<body>
 
<iframe
id="player"
src="https://www.youtube.com/embed/E0WTUpGFcD8?autoplay=1"
allow="autoplay; fullscreen"
allowfullscreen>
</iframe>
 
</body>
</html>


https://www.youtube.com/watch?v=UqmFBHhr_Bg


fullscreen.html



If you're using the fullscreen video layout you were working on earlier, replacing your <video> tag with the <iframe> above is usually the simplest way to display a YouTube video full-screen.

0 Comments









paris.us