Pages

Embed YouTube Videos

We can embed YouTube videos to your 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

Copy the iframe code given and paste it into the html of your web page.

Click the 'Embed' button next to the link they show you


Example:

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="459" 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="450" height="415"></object>
 </body>
</html>


No comments:

Post a Comment

Popular Posts