Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
## Introduction
Use [amp-iframe]( for embedding content into AMP files via iframe. Useful for displaying content otherwise not (yet) supported by AMP.
<!-- -->
<!doctype html>
<html >
<meta charset="utf-8">
<script async src=""></script>
<!-- Import the amp-iframe component in the header. -->
<script async custom-element="amp-iframe" src=""></script>
<link rel="canonical" href="">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<style amp-custom>
div[overflow] {
text-align: center;
background: #f9f7f7;
line-height: 36px;
Iframes must be either 600px away from the top or not within the first 75% of the viewport when
scrolled to the top – whichever is smaller. This example might not work depending on your screen
width. In that case it will only show a loading indicator.
<amp-iframe title="Triple M's Hot Breakfast with Eddie McGuire - 29th August 2016"
sandbox="allow-scripts allow-same-origin allow-popups"
<p placeholder>Loading</p>
<p>Hello world</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment