5.9.12

2 Ways to Embed YouTube Playlists to Website

2 Ways to Embed YouTube Playlists to Website



Still embed YouTube videos on a web page one by one? In fact, you have other ways to do it - create a YouTube playlist and embed using the method described in this article. There are many advantages to embed YouTube playlist to a web page instead of multiple videos. First, it saves the web page space. Visitors don't need to scroll down to watch the next YouTube videos. Second, it will reduce the web page size because only one embed code is used, which makes the page load faster. Third, the videos will be played continuously without any interruption.

There is only one disadvantage - you must learn how to embed a YouTube playlist to website. But after read this article, you will see how easy it's. Check it out.

First, you need a YouTube playlist. See how to create a YouTube Playlist here for Christmas or any uses. To make YouTube videos, learn about Wondershare DVD Slideshow Builder >>

Using IFRAME Code to Embed YouTube Playlist

The new style YouTube playlist embed code begins with "<iframe...". Here is how you can get the YouTube playlist embed code.

1. Go to the Playlists section of your account.
2. Select the playlist you'd like to embed.
3. Click Share and next Embed to show the playlist embed code.
4. Copy the embed code.
5. Paste the embed code into your website or blog.

Watch a sample YouTube playlist embedded using the IFRAME code.

Below is the IFRAME embedding code example. If you know what the YouTube playlist URL is, just change the PLAYLISTID to suit your needs before embedding to website.

<iframe width="560" height="315" src="http://www.youtube.com/embed/videoseries?list=PLAYLISTID&hl=en_US" frameborder="0" allowfullscreen></iframe>

Using Old Code to Embed YouTube Playlist

While the IFRAME embed method is simple, some browsers and services don't support this tag. This case, you have to switch to the old embed code.

Since it has not provided by YouTube, you could copy the code below and change the "PlaylistID" to your need. Also change the width and height parameters if necessary.

 <object width="560" height="315">
 <param name="movie" value="http://www.youtube.com/p/PlaylistID"></param>
 <param name="allowFullScreen" value="true"></param>
 <param name="allowscriptaccess" value="always"></param>
 <embed src="http://www.youtube.com/p/PlaylistID" width="560" height="315"
 type="application/x-shockwave-flash" allowscriptaccess="always"
 allowfullscreen="true"></embed></object>

Tips: The Difference Between 2 Methods

The IFRAME embed code supports both Flash and HTML5 video, while the older style of embed code begins with "<object..." and only support Flash playback. By the way, the "<embed..." is for Internet Explorer.