Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 3.72 KB

README.md

File metadata and controls

55 lines (39 loc) · 3.72 KB

AMP HTML Extensions

AMP Extensions are either extended components or extended templates.

AMP HTML Extended Components

Extended components must be explicitly included into the document as custom elements.

For example, to include a youtube video in your page include the following script in the <head>:

<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>

Current list of extended components:

Component Description
amp-anim Runtime-managed animated image, most typically a GIF.
amp-audio Replacement for the HTML5 audio tag.
amp-brightcove Displays a Brightcove Video Cloud or Perform player.
amp-carousel Generic carousel for displaying multiple similar pieces of content along a horizontal axis.
amp-fit-text Expand or shrink font size to fit the content within the space given.
amp-font Trigger and monitor the loading of custom fonts.
amp-iframe Displays an iframe.
amp-image-lightbox Allows for a “image lightbox” or similar experience.
amp-instagram Displays an instagram embed.
amp-install-serviceworker Installs a ServiceWorker.
amp-lightbox Allows for a “lightbox” or similar experience.
amp-list A dynamic list that can download data and create list items using a template
amp-twitter Displays a Twitter Tweet.
amp-vine Displays a Vine simple embed.
amp-youtube Displays a Youtube video.

AMP HTML Extended Templates

NOT LAUNCHED YET

Extended templates must be explicitly included into the document as custom templates.

For example, to include a amp-mustache template in your page include the following script in the <head>:

<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.1.js"></script>

Current list of extended templates:

Component Description
amp-mustache Mustache template.