HTML YouTube

YouTube videos can be embedded into website by using either the iframe or object HTML tags.

YouTube by Iframe

Below example will demonstrate the basic architecture of HTML Comments.

 <!doctype html>  
<html>

    <head>
        <title>YouTube by Iframe</title>
    </head>

    <body>
        <iframe src="https://www.youtube.com/watch?v=hWQHOrzwtR4" width="560" height="315" frameborder="0" allowfullscreen></iframe>
    </body>

</html> 

YouTube by Object

Below example will demonstrate the basic architecture of HTML Comments.

 <!doctype html>  
<html>

    <head>
        <title>YouTube by Object</title>
    </head>

    <body>
        <object data="https://www.youtube.com/watch?v=hWQHOrzwtR4" width="560" height="315"></object>
    </body>

</html>