Sunday, April 20, 2025

HTML Insert YouTube

It is extremely easy to insert YouTube video into html page. To do that, we will use iframes.

Youtube provide us code that we can grab below YT videos clicking on share button. 

Next step, chose Embed (icon with left and right arrows).

When you see a source code that YT is offering you, just copy-paste it into html page you are coding, exactly into place where YT video need to be presented to end user.

There is no need fo advanced code right now, YT is offering us all we need. 

If needed, we can set custom width and height of embedded video.

You are highly advised to watch corresponding YT video for this tutorial.

<!DOCTYPE html>

<html>
<head>
	<title>Security Tutorials</title>
</head>

<body>

	<h1>YouTube in Web Page - How To</h1>
	
	<iframe width="560" height="315" src="https://www.youtube.com/embed/VwupRvhLjjM" title="YouTube video player" frameborder="0" 
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
	
</body>
</html>

No comments:

Post a Comment

Tkinter Introduction - Top Widget, Method, Button

First, let's make shure that our tkinter module is working ok with simple  for loop that will spawn 5 instances of blank Tk window .  ...