Embed YouTube without Related Video
When you want to embed a YouTube video on a web page, YouTube will provide you with an embed code which you can copy and paste to your web page.
You get this embed code by going to the YouTube page that is hosting the video and clicking on “Share” button and then clicking the “Embed” button.
This is code typically looks like …
Typically, after a YouTube video completes, it will display related videos. If you do not want it to display related videos, then uncheck the box that says “include related video”. This will modify the embed code by adding an extra “query string” to the src URL. It adds “?rel=0” as shown above.
Now copy and paste this embed code to your webpage and play the video. You will notice that when the video completes, it no longer display related video. It will look like this at the end …