embed youtube video in html

We can embed YouTube videos to web site by using either the iframe or object HTML tags.

Based on the information from https://www.youtube.com/yt/dev/

Use the youtube site to find the video you want

Click the 'Share' button below the video

Click the 'Embed' button next to the link they show you
Copy the iframe code given and paste it into the html of your web page.

Example:

Porgramming Video
How to display records using database in php using codeigniter framework

https://www.youtube.com/watch?v=5TvbzlE2Xcw


<html>
 <body>
  <iframe src="https://www.youtube.com/watch?v=5TvbzlE2Xcw"
   width="460" height="415" frameborder="0" allowfullscreen></iframe>
 </body>
</html>


Example:

Same YouTube video using the object tag instead of the iframe tag

<html>
 <body>
  <object data="https://www.youtube.com/watch?v=5TvbzlE2Xcw"
   width="460" height="415"></object>
 </body>
</html>

No comments:

Post a Comment

how to call ssh from vs code

 To call SSH from VS Code, you can use the built-in Remote Development extension. This extension allows you to open a remote folder or works...