Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 2.31 KB

amp-embed.md

File metadata and controls

65 lines (52 loc) · 2.31 KB

amp-embed

Description Use amp-embed to embed elements into the AMP page. Can be used instead of amp-ad when semantically more accurate.
Availability Stable
Required Script <script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
Supported Layouts FILL, FIXED, FIXED_HEIGHT, FLEX_ITEM, NODISPLAY, RESPONSIVE
Examples None

Implementation

The <amp-embed> is actually an alias to the <amp-ad> tag, deriving all of its functionality with a different tag name.

<amp-embed width=400 height=300
        layout=responsive
        data-publisher=thepublisher
        data-mode=themode
        data-article=auto
        data-placement="Below Article Thumbnails">
</amp-embed>

Supported embed types

Validation

See amp-embed rules in the AMP validator specification.

Notes

To use <amp-embed>, the script to the amp-ad library is needed. It is recommended to add the script manually but currently it will be automatically fetched when amp-embed is used.