How to embed Youtube videos in HTML

The easiest way to display videos in your web page is to use YouTube. If you want to display a video in a web page, you can upload the video to YouTube and insert HTML code to display the video in your web page.

Using <iframe> to display YouTube Video


<html>
<body>

<iframe width="420" height="345"
src="http://www.youtube.com/v/jMhg9IHDJPU?version=3&feature=player_detailpage">

</iframe>

</body>
</html>

Using <embed> to display YouTube Video

<html>
<body>

<embed width="350" height="375" src="http://www.youtube.com/v/jMhg9IHDJPU?version=3&feature=player_detailpage"

type="application/x-shockwave-flash">

</embed>

</body>
</html>


Posted in Html Tagged with: ,