Embedding YouTube
YouTube provides an embed URL for each video. Use it in an iframe to display the player on your page.
Add parameters to the URL to control player behavior like autoplay, loop, and related videos.
YouTube provides an embed URL for each video. Use it in an iframe to display the player on your page.
Add parameters to the URL to control player behavior like autoplay, loop, and related videos.
<iframe
width="560"
height="315"
src="https://www.youtube.com/embed/VIDEO_ID?rel=0&modestbranding=1"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
Add ?rel=0 to the YouTube URL to prevent unrelated videos from showing after playback ends.