Youtube is a video hosting platform. It is a great platform to share your video content with the world. However, what if you want to play YouTube videos on your website? You can embed youtube videos using HTML Youtube video tag url.
Youtube provides an embed Video url using <iframe>
tag, that allows adding their videos on any website. Hosting videos on websites and managing them can get complicated. Hence, its better to first upload them on YouTube and then add them in the website.
Adding Youtube videos using Youtube video tag url in a website, increases view counts.It also enhances website content quality and can result in better search engine rankings.
To Add and Play Youtube Videos on a website, just follow these simple steps:
copy embed code
.Youtube uses <iframe> tags to add videos in other websites. The Youtube video url that you copied using above listed steps, has to be pasted within your website's body. Look at the example to understand the approach:
If you want the video to be played automatically when the page loads, then use autoplay. Autoplay is a feature of Youtube that will start the video regardless of whether the user plays it or not.
The autoplay attribute has two values:
autoplay=0
(default): The video will not play automatically when the player loads on the Web Browser.autoplay=1
: The video will play automatically when the player loads on the Web Browser.Note : Use the autoplay feature very responsibly as it can be very annoying to the visitor.
A Video loop is a feature of restarting the video from the beginning after it finishes.
The loop has two values:
loop=0
(default): Once the video finishes, it will not restart automatically.loop=1
: The video will play in a loop forever.Youtube player controls can be manually turned on/off.
controls=0
: Youtube video player will not display any controls like play, pause and so on.controls=1
(default): All the controls will be displayed and accessible. Follow Us: