Skip to content

Instantly share code, notes, and snippets.

@chromaphobic
Last active August 29, 2015 14:10
Show Gist options
  • Save chromaphobic/593af076b33762925bc2 to your computer and use it in GitHub Desktop.
Save chromaphobic/593af076b33762925bc2 to your computer and use it in GitHub Desktop.
Responsive Embed HTML
<!-- The below code is all that is required for embedding a responsive YouTube video -->
<!-- Any width or height attributes should be removed from the iframe -->
<!-- The frameborder='0' and allowfullscreen attributes should be present -->
<div class="embed-container">
<iframe src="http://www.youtube.com/embed/HsRD6pTnlb8" frameborder='0' allowfullscreen></iframe>
</div>
<!-- By default, the iframe will automatically be sized to the dimensions of a video -->
<!-- If you need taller iframes (for non-YouTube content) two other classes exist: -->
<!-- "embed-container-tall" and "embed-container-extra-tall" -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment