Youtube Video


Go to main Page

Youtube video in HTML

For embedding a youtube video in an HTML document we <iframe>.

Example


<iframe  src="https://www.youtube.com/embed/yXr9xOUN_24" 
frameborder="0" 
allow="accelerometer; 
autoplay; 
clipboard-write; 
encrypted-media; 
gyroscope; 
picture-in-picture"
 allowfullscreen></iframe>

  

Width and Height of Video

You can add width and height of your choice in the iframe attribute


<iframe height="200px" width="400px"  src="https://www.youtube.com/embed/yXr9xOUN_24" 
frameborder="0" 
allow="accelerometer; 
autoplay; 
clipboard-write; 
encrypted-media; 
gyroscope; 
picture-in-picture"
 allowfullscreen></iframe>