Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 3.2 KB

README.md

File metadata and controls

52 lines (36 loc) · 3.2 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-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-lightbox Allows for a “lightbox” or similar experience.
amp-twitter Displays a Twitter Tweet.
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. |