HTML:
<iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID" frameborder="0" allowfullscreen></iframe> CSS:
Once you've added the iframe, customized the player, and added controls, you can put everything together. Here's an example of what your final CodePen project might look like:
iframe:hover { box-shadow: 0 0 20px rgba(0, 0, 0, 0.4); } JavaScript:
Now that you have a basic understanding of HTML5 video players and CodePen, let's create a custom YouTube HTML5 video player.
iframe { border: none; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); }