AmpAttributes

AmpAttributes class

Represents attributes used by the amp-components.

The AmpAttributes type exposes the following members:

Constructors

NameDescription
AmpAttributes()Initializes a new instance of the AmpAttributes class

Properties

NameDescription
is_fallbackDefine that current element is fallback.
heigthsThe value of this attribute is a sizes expression based on media expressions.
layoutAMP provides a set of layouts that specify how an AMP component behaves in the document layout.
mediaThe value of media is a media query. If the query does not match, the element is not rendered and its resources and potentially its child resources will not be fetched. If the browser window changes size or orientation, the media queries are re-evaluated and elements are hidden and shown based on the new results.
is_noloadingThe noloading attribute indicates whether the “loading indicator” should be turned off for this element.
onThe on attribute is used to install event handlers on elements.
is_place_holderThe placeholder attribute indicates that the element marked with this attribute acts as a placeholder for the parent AMP element.
sizesThe value of the AMP sizes attribute is a sizes expression that selects the defined size corresponding to the media query based on the current window size.
widthWidth of element.
heightHeight of element.

Methods

NameDescription
to_amp_html()
to_html()

See Also