Skip to content

Latest commit

 

History

History
89 lines (77 loc) · 4.2 KB

amp-embed.md

File metadata and controls

89 lines (77 loc) · 4.2 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
Examples None

Implementation

The <amp-embed> is actually an alias to the <amp-ad> tag, deriving all of it's 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 errors

The following lists validation errors specific to the amp-embed tag (see also amp-embed in the AMP validator specification):

Validation Error Description
The mandatory attribute 'example1' is missing in tag 'example2'. Error thrown when type attribute missing.
Missing URL for attribute 'example1' in tag 'example2'. Error thrown when src attribute is missing it's URL.
Malformed URL 'example3' for attribute 'example1' in tag 'example2'. Error thrown when src attribute's URL is invalid.
Invalid URL protocol 'example3:' for attribute 'example1' in tag 'example2'. Error thrown src attribute's URL is http; https protocol required.
The implied layout 'example1' is not supported by tag 'example2'. Error thrown when implied set to CONTAINER; this layout type isn't supported.
The specified layout 'example1' is not supported by tag 'example2'. Error thrown when specified layout set to CONTAINER; this layout type isn't supported.
The property 'example1' in attribute 'example2' in tag 'example3' is set to 'example4', which is invalid. Error thrown when invalid value is given for attributes height or width. For example, height=auto triggers this error for all supported layout types, with the exception of NODISPLAY.