Permalink
Switch branches/tags
Find file Copy path
6096 lines (6056 sloc) 175 KB
#
# Copyright 2016 The AMP HTML Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the license.
#
# This revision id refers to the validator revision id, currently a Google
# internal mechanism. When backwards incompatible changes to the validator
# engine are made, this value must be incremented to prevent old binaries
# in production from crashing. This id is not relevant to validator.js
# because thus far, engine (validator.js) and spec file
# (validator-main.protoascii) are always released together.
min_validator_revision_required: 348
# The spec file revision allows the validator engine to distinguish
# newer versions of the spec file. This is currently a Google internal
# mechanism, validator.js does not use this facility. However, any
# change to this file (validator-main.js) requires updating this revision id.
spec_file_revision: 746
styles_spec_url: "https://www.ampproject.org/docs/guides/author-develop/responsive/style_pages"
script_spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
css_length_spec: {
html_format: AMP
max_bytes: 50000
max_bytes_per_inline_style: 1000
spec_url: "https://www.ampproject.org/docs/guides/author-develop/responsive/style_pages"
}
# Validator extensions.
# =====================
# In addition to the rules in this file, the Validator honors the rules
# in the extensions/*/validator-*.protoascii files. This makes it
# easy to organize the rules for extensions next to their Javascript
# implementation.
# Rules for AMP HTML
# (https://www.ampproject.org/docs/reference/spec)
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "!DOCTYPE"
spec_name: "html doctype"
mandatory_parent: "$ROOT"
mandatory: true
unique: true
attrs: {
name: "html"
mandatory: true
value: ""
}
spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup"
}
# Below, we list the allowed elements in the order in which they are appear
# in the spec in section 4 "The Elements of HTML"
# (http://www.w3.org/TR/html5/single-page#html-elements).
# 4.1 The root element
# 4.1.1 The html element
tags: { # AMP
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "HTML"
mandatory: true
mandatory_parent: "!DOCTYPE"
unique: true
spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup"
}
# 4.2 Document metadata
# 4.2.1 The head element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "HEAD"
mandatory: true
mandatory_parent: "HTML"
unique: true
spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup"
}
# 4.2.2 The title element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "TITLE"
spec_name: "title"
attrs: { name: "[text]" }
}
# 4.2.3 the base element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "BASE"
unique: true
mandatory_parent: "HEAD"
# We only allow "/" right now because other value can cause havoc with PWA
# implementations. In the future, it may be possible to widen this to any
# absolute URL.
attrs: {
name: "href"
value: "/"
}
attrs: {
name: "target"
value_casei: "_blank"
value_casei: "_self"
value_casei: "_top"
}
}
# Disallowed.
# 4.2.4 the link element
attr_lists: {
name: "common-link-attrs"
attrs: { name: "charset" value_casei: "utf-8" }
attrs: { name: "color" }
attrs: { name: "crossorigin" }
attrs: { name: "hreflang" }
attrs: { name: "media" }
attrs: { name: "sizes" }
attrs: { name: "target" }
attrs: { name: "type" }
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "LINK"
spec_name: "link rel="
disallowed_ancestor: "TEMPLATE"
attrs: { name: "href" }
attrs: {
name: "rel"
mandatory: true
# There are a wide variety of link rel attribute values used in the wild as
# this attribute is used as meta-data for any html client such as search
# engines. Unfortunately, there are also a number of attribute values which
# have behavioral impacts in modern browsers. A few places where these are
# loosely documented include:
# - http://microformats.org/wiki/existing-rel-values
# - http://www.iana.org/assignments/link-relations/link-relations.xhtml
# - https://html.spec.whatwg.org/#linkTypes
# We blacklist a few specific values which have browser behavior that could
# negatively impact performance.
# TODO(gregable): This could be improved such that the error message would
# report which value in a list is the one causing problems.
blacklisted_value_regex: "(^|\\s)(" # Values are space separated.
"canonical|" # Handled separately below, has specific requirements.
"components|"
"import|"
"manifest|" # Handled separately below, has specific requirements.
"preload|" # Handled separately below, has specific requirements.
"serviceworker|"
"stylesheet|" # Handled separately below, has specific requirements.
"subresource|"
")(\\s|$)"
# It is worth noting that user-authored tags for dns-prefectch, preconnect,
# prefetch, and prerender will be disabled by the transformations applied
# in the AMP Cache. Therefore, these hints will only be used on publisher
# origins, not on the AMP Cache.
}
attr_lists: "common-link-attrs"
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
tags: {
html_format: AMP
html_format: EXPERIMENTAL
tag_name: "LINK"
spec_name: "link rel=canonical"
mandatory_parent: "HEAD"
mandatory: true
unique: true
attrs: {
name: "href"
mandatory: true
value_url: {
protocol: "http"
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: {
name: "rel"
value_casei: "canonical"
mandatory: true
dispatch_key: NAME_VALUE_DISPATCH
}
attr_lists: "common-link-attrs"
spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup"
}
# Allow <link rel="manifest" ...> but not <link rel="manifest foo" ...>
tags: {
html_format: AMP
html_format: AMP4ADS
tag_name: "LINK"
spec_name: "link rel=manifest"
mandatory_parent: "HEAD"
satisfies: "amp-app-banner data source"
attrs: {
name: "href"
mandatory: true
value_url: {
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: {
name: "rel"
value_casei: "manifest"
mandatory: true
dispatch_key: NAME_VALUE_DISPATCH
}
attr_lists: "common-link-attrs"
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "LINK"
spec_name: "link rel=preload"
disallowed_ancestor: "TEMPLATE"
attrs: { name: "as" }
attrs: { name: "href" }
attrs: {
name: "rel"
mandatory: true
value_casei: "preload"
dispatch_key: NAME_VALUE_DISPATCH
}
attr_lists: "common-link-attrs"
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# Whitelisted font providers
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "LINK"
spec_name: "link rel=stylesheet for fonts"
mandatory_parent: "HEAD"
attrs: { name: "async" }
attrs: { name: "crossorigin" } # SRI attribute (https://www.w3.org/TR/SRI/)
attrs: {
name: "href"
mandatory: true
value_regex: "https://cdn\\.materialdesignicons\\.com/"
"([0-9]+\\.?)+/css/materialdesignicons\\.min\\.css|"
"https://cloud\\.typography\\.com/"
"[0-9]*/[0-9]*/css/fonts\\.css|"
"https://fast\\.fonts\\.net/.*|"
"https://fonts\\.googleapis\\.com/css\\?.*|"
"https://fonts\\.googleapis\\.com/icon\\?.*|"
"https://fonts\\.googleapis\\.com/earlyaccess/.*\\.css|"
"https://maxcdn\\.bootstrapcdn\\.com/font-awesome/"
"([0-9]+\\.?)+/css/font-awesome\\.min\\.css(\\?.*)?|"
"https://(use|pro)\\.fontawesome\\.com/releases/v([0-9]+\\.?)+"
"/css/(all|brands|solid|regular|light|fontawesome)\\.css|"
"https://(use|pro)\\.fontawesome\\.com/[0-9a-zA-Z]+\\.css|"
"https://use\\.typekit\\.net/[\\w\\p{L}\\p{N}_]+\\.css"
}
attrs: { name: "integrity" } # SRI attribute (https://www.w3.org/TR/SRI/)
attrs: { name: "media" }
attrs: {
name: "rel"
mandatory: true
value_casei: "stylesheet"
dispatch_key: NAME_VALUE_DISPATCH
}
attrs: {
name: "type"
value_casei: "text/css"
}
spec_url: "https://www.ampproject.org/docs/reference/spec#custom-fonts"
}
# itemprop=sameAs is allowed per schema.org, needs not be in head
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "LINK"
spec_name: "link itemprop=sameAs"
attrs: {
name: "href"
mandatory: true
}
attrs: {
name: "itemprop"
mandatory: true
value_casei: "sameas"
dispatch_key: NAME_VALUE_DISPATCH
}
attr_lists: "common-link-attrs"
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# rel= isn't mandatory when itemprop= is present.
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "LINK"
spec_name: "link itemprop="
attrs: {
name: "href"
mandatory: true
}
attrs: {
name: "itemprop"
mandatory: true
}
attr_lists: "common-link-attrs"
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# rel= isn't mandatory when property= is present.
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "LINK"
spec_name: "link property="
attrs: {
name: "href"
mandatory: true
}
attrs: {
name: "property"
mandatory: true
}
attr_lists: "common-link-attrs"
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# 4.2.5 the meta element
# Charset must be utf8, and a specific viewport is required.
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta charset=utf-8"
mandatory: true
mandatory_parent: "HEAD"
unique: true
attrs: {
dispatch_key: NAME_DISPATCH
name: "charset"
mandatory: true
value_casei: "utf-8"
}
spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta name=viewport"
mandatory: true
mandatory_parent: "HEAD"
unique: true
attrs: {
name: "content"
mandatory: true
value_properties: {
properties: { name: "width" mandatory: true value: "device-width" }
properties: { name: "height" }
properties: { name: "initial-scale" }
properties: { name: "minimum-scale" mandatory: true value_double: 1.0 }
properties: { name: "maximum-scale" }
properties: { name: "shrink-to-fit" }
properties: { name: "user-scalable" }
properties: { name: "viewport-fit" }
}
}
attrs: {
name: "name"
mandatory: true
value: "viewport"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup"
}
# This tag is a hack to tell IE 10 to use its modern rendering engine as opposed
# to the IE8 engine. So it's explicitly allowed.
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=X-UA-Compatible"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
value_properties: {
properties: { name: "ie" value: "edge" }
properties: { name: "chrome" value: "1" }
}
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "x-ua-compatible"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# Tag specific to apple-itunes-app installs, see also <amp-app-banner>.
tags: {
html_format: AMP
html_format: AMP4ADS
tag_name: "META"
spec_name: "meta name=apple-itunes-app"
mandatory_parent: "HEAD"
satisfies: "amp-app-banner data source"
attrs: {
name: "content"
mandatory: true
value_regex: ".*app-id=.*"
}
attrs: {
name: "name"
value_casei: "apple-itunes-app"
mandatory: true
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# AMP & AMP4ADS metadata, name=amp-experiments-opt-in
# https://github.com/lannka/amphtml/blob/master/tools/experiments/README.md
tags: {
html_format: AMP
html_format: AMP4ADS
tag_name: "META"
spec_name: "meta name=amp-experiments-opt-in"
mandatory_parent: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-experiments-opt-in"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# AMP metadata, name=amp-3p-iframe-src
tags: {
html_format: AMP
tag_name: "META"
spec_name: "meta name=amp-3p-iframe-src"
mandatory_parent: "HEAD"
attrs: {
name: "content"
mandatory: true
value_url: {
protocol: "https"
}
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-3p-iframe-src"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/components/amp-ad"
}
# AMP metadata, name=amp-experiment-token
# Related to AMP Origin Experiments
tags: {
html_format: AMP
tag_name: "META"
spec_name: "meta name=amp-experiment-token"
mandatory_parent: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-experiment-token"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# AMP metadata, name=amp-link-variable-allowed-origin
# https://github.com/ampproject/amphtml/issues/8132
tags: {
html_format: AMP
tag_name: "META"
spec_name: "meta name=amp-link-variable-allowed-origin"
mandatory_parent: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-link-variable-allowed-origin"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# AMP metadata, name=amp-google-client-id-api
tags: {
html_format: AMP
tag_name: "META"
spec_name: "meta name=amp-google-clientid-id-api"
mandatory_parent: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-google-client-id-api"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# AMP metadata, name=amp-ad-doubleclick-sra
# Enables SRA for amp-ad doubleclick Fast Fetch
tags: {
html_format: AMP
tag_name: "META"
spec_name: "meta name=amp-ad-doubleclick-sra"
mandatory_parent: "HEAD"
attrs: {
name: "name"
mandatory: true
value_casei: "amp-ad-doubleclick-sra"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# AMP4ADS metadata, name=amp4ads-id
# https://github.com/ampproject/amphtml/issues/7730
tags: {
html_format: AMP4ADS
tag_name: "META"
spec_name: "meta name=amp4ads-id"
mandatory_parent: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp4ads-id"
dispatch_key: NAME_VALUE_DISPATCH
}
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta name= and content="
attrs: { name: "content" }
attrs: { name: "itemprop" } # itemprop is non-standard, but commonly seen.
# The validator accepts any name="..." attribute values except
# for a few specific name values which have more specific rules above or
# are altogether disallowed.
attrs: {
name: "name"
blacklisted_value_regex: "(^|\\s)("
"amp-.*|"
"amp4ads-.*|"
"apple-itunes-app|"
"content-disposition|"
"revisit-after|"
"viewport"
")(\\s|$)"
}
attrs: { name: "property" } # property is non-standard, but commonly seen.
# scheme is used by Dublin Core, see issue #13993
attrs: { name: "scheme" }
}
# This is redundant with meta charset, but also harmless as long as it's
# set to utf-8.
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=Content-Type"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
value_casei: "text/html; charset=utf-8"
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "content-type"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# http-equiv content-language tag
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=content-language"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "content-language"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# http-equiv pics-label tag
# https://www.w3.org/PICS/
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=pics-label"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "pics-label"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# http-equiv imagetoolbar tag
# https://msdn.microsoft.com/en-us/library/ms532986(v=vs.85).aspx
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=imagetoolbar"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "imagetoolbar"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# http-equiv content-style-type
# https://www.w3.org/TR/REC-html40/present/styles#h-14.2.1
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=Content-Style-Type"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
value_casei: "text/css"
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "content-style-type"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# http-equiv content-script-type
# https://www.w3.org/TR/html4/interact/scripts#h-18.2.2.1
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=Content-Script-Type"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
value_casei: "text/javascript"
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "content-script-type"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# http-equiv origin-trial tag
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=origin-trial"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "origin-trial"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# http-equiv resource-type
# http://www.metatags.info/meta_http_equiv_resource_type
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta http-equiv=resource-type"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "resource-type"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# http-equiv x-dns-prefetch-control
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-DNS-Prefetch-Control
tags: {
html_format: AMP
tag_name: "META"
spec_name: "meta http-equiv=x-dns-prefetch-control"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
value_casei: "off"
value_casei: "on"
}
attrs: {
name: "http-equiv"
mandatory: true
value_casei: "x-dns-prefetch-control"
dispatch_key: NAME_VALUE_DISPATCH
}
spec_url: "https://www.ampproject.org/docs/reference/spec#html-tags"
}
# AMP metadata, name=amp-ad-enable-refresh
# Enables Refresh for amp-ad doubleclick Fast Fetch
tags: {
html_format: AMP
html_format: AMP4ADS
tag_name: "META"
spec_name: "meta name=amp-ad-enable-refresh"
mandatory_ancestor: "HEAD"
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-ad-enable-refresh"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# AMP metadata, name=amp-to-amp-navigation
# Enables AMP-to-AMP navigation
tags: {
html_format: AMP
html_format: EXPERIMENTAL
tag_name: "META"
spec_name: "meta name=amp-to-amp-navigation"
mandatory_parent: "HEAD"
unique: true
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-to-amp-navigation"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# AMP metadata, name=amp-cta-type
# Specifies the Single Page Story Ad call to action enum
tags: {
html_format: AMP4ADS
tag_name: "META"
spec_name: "meta name=amp-cta-type"
mandatory_parent: "HEAD"
unique: true
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-cta-type"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# AMP metadata, name=amp-cta-url
# Specifies the Single Page Story Ad call to action outlink
tags: {
html_format: AMP4ADS
tag_name: "META"
spec_name: "meta name=amp-cta-url"
mandatory_parent: "HEAD"
unique: true
attrs: {
name: "content"
mandatory: true
}
attrs: {
name: "name"
mandatory: true
value_casei: "amp-cta-url"
dispatch_key: NAME_VALUE_DISPATCH
}
}
# 4.2.6 The style
# Text contents of the style tag will be validated seperately.
tags: { # Special custom 'author' spreadsheet for AMP
html_format: AMP
html_format: EXPERIMENTAL
tag_name: "STYLE"
spec_name: "style amp-custom"
unique: true
mandatory_parent: "HEAD"
attrs: {
name: "amp-custom"
mandatory: true
value: ""
# This is a fine dispatch key, but we would prefer that this tagspec
# is used for errors related to <style> tags missing the amp-custom
# attribute rather than the boilerplate tagspec which doesn't have an
# attribute and thus can't have a dispatch_key.
# dispatch_key: NAME_DISPATCH
}
attrs: { name: "nonce" }
attrs: { # This is a default, but it doesn't hurt.
name: "type"
value_casei: "text/css"
}
cdata: {
max_bytes: 50000
max_bytes_spec_url: "https://www.ampproject.org/docs/reference/spec#maximum-size"
css_spec: {
at_rule_spec: {
name: 'font-face'
type: PARSE_AS_DECLARATIONS
}
at_rule_spec: {
name: 'keyframes'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: 'media'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: 'supports'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: '$DEFAULT' # matches if none of the above match
type: PARSE_AS_ERROR
}
image_url_spec: {
protocol: "https"
protocol: "http"
protocol: "data"
protocol: "absolute" # Temporary / will go away.
allow_empty: true
}
font_url_spec: {
protocol: "https"
protocol: "http"
protocol: "data"
allow_empty: true
}
}
blacklisted_cdata_regex: {
regex: "<!--"
error_message: "html comments"
}
# These regex blacklists are temporary hacks to validate essential CSS
# rules. They will be replaced later with more principled solutions.
blacklisted_cdata_regex: {
regex: "(^|\\W)i-amphtml-"
error_message: "CSS i-amphtml- name prefix"
}
blacklisted_cdata_regex: {
regex: "!important"
error_message: "CSS !important"
}
}
spec_url: "https://www.ampproject.org/docs/reference/spec#stylesheets"
}
tags: { # Special custom 'author' spreadsheet for AMP4ADS
html_format: AMP4ADS
tag_name: "STYLE"
spec_name: "style amp-custom (AMP4ADS)"
unique: true
mandatory_parent: "HEAD"
attrs: {
name: "amp-custom"
mandatory: true
value: ""
# This is a fine dispatch key, but we would prefer that this tagspec
# is used for errors related to <style> tags missing the amp-custom
# attribute rather than the boilerplate tagspec which doesn't have an
# attribute and thus can't have a dispatch_key.
# dispatch_key: NAME_DISPATCH
}
attrs: { name: "nonce" }
attrs: { # This is a default, but it doesn't hurt.
name: "type"
value_casei: "text/css"
}
cdata: {
max_bytes: 20000 # Smaller than AMP, which is 50,000.
max_bytes_spec_url: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/amp-a4a-format.md#css"
css_spec: {
at_rule_spec: {
name: 'font-face'
type: PARSE_AS_DECLARATIONS
}
at_rule_spec: {
name: 'keyframes'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: 'media'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: 'supports'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: '$DEFAULT' # matches if none of the above match
type: PARSE_AS_ERROR
}
image_url_spec: {
protocol: "https"
protocol: "http"
protocol: "data"
protocol: "absolute" # Temporary / will go away.
allow_empty: true
}
font_url_spec: {
protocol: "https"
protocol: "http"
protocol: "data"
allow_empty: true
}
validate_amp4ads: true
}
blacklisted_cdata_regex: {
regex: "<!--"
error_message: "html comments"
}
# These regex blacklists are temporary hacks to validate essential CSS
# rules. They will be replaced later with more principled solutions.
blacklisted_cdata_regex: {
regex: "(^|\\W)i-amphtml-"
error_message: "CSS i-amphtml- name prefix"
}
blacklisted_cdata_regex: {
regex: "!important"
error_message: "CSS !important"
}
}
spec_url: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/amp-a4a-format.md#css"
}
tags: { # Special custom 'author' spreadsheet for AMP
html_format: AMP4EMAIL
tag_name: "STYLE"
spec_name: "style amp-custom (AMP4EMAIL)"
unique: true
mandatory_parent: "HEAD"
attrs: {
name: "amp-custom"
mandatory: true
value: ""
# This is a fine dispatch key, but we would prefer that this tagspec
# is used for errors related to <style> tags missing the amp-custom
# attribute rather than the boilerplate tagspec which doesn't have an
# attribute and thus can't have a dispatch_key.
# dispatch_key: NAME_DISPATCH
}
attrs: { name: "nonce" }
attrs: { # This is a default, but it doesn't hurt.
name: "type"
value_casei: "text/css"
}
# TODO(b/68756045): Whitelist CSS properties allowed in Dynamic Mail.
cdata: {
max_bytes: 50000
max_bytes_spec_url: "https://www.ampproject.org/docs/reference/spec#maximum-size"
css_spec: {
at_rule_spec: {
name: 'media'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: '$DEFAULT' # matches if none of the above match
type: PARSE_AS_ERROR
}
image_url_spec: {
protocol: "https"
}
}
blacklisted_cdata_regex: {
regex: "<!--"
error_message: "html comments"
}
# These regex blacklists are temporary hacks to validate essential CSS
# rules. They will be replaced later with more principled solutions.
blacklisted_cdata_regex: {
regex: "(^|\\W)i-amphtml-"
error_message: "CSS i-amphtml- name prefix"
}
blacklisted_cdata_regex: {
regex: "!important"
error_message: "CSS !important"
}
}
spec_url: "https://www.ampproject.org/docs/reference/spec#stylesheets"
}
tags: {
html_format: AMP
html_format: EXPERIMENTAL
tag_name: "STYLE"
spec_name: "head > style[amp-boilerplate] - old variant"
mandatory_alternatives: "head > style[amp-boilerplate]"
unique: true
mandatory_parent: "HEAD"
# Special Case. This tag is deprecated, however this matches any <style> tag
# in the document head without an associated attribute. This is far more
# likely to happen to be caused by the user intending to use
# <style amp-custom> than having used a deprecated amp-boilerplate. So, for
# this case, we do not emit deprecation warnings. Note that the <noscript>
# component of the deprecated boilerplate will still emit a deprecation
# warning. See https://github.com/ampproject/amphtml/issues/4421
#deprecation: "head > style[amp-boilerplate]"
#deprecation_url: "https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md"
attrs: { name: "nonce" }
cdata: {
cdata_regex: "body ?{opacity: ?0}"
}
spec_url: "https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md"
}
tags: {
html_format: AMP
tag_name: "STYLE"
spec_name: "noscript > style[amp-boilerplate] - old variant"
mandatory_alternatives: "noscript > style[amp-boilerplate]"
unique: true
mandatory_parent: "NOSCRIPT"
mandatory_ancestor: "HEAD"
deprecation: "noscript > style[amp-boilerplate]"
deprecation_url: "https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md"
attrs: { name: "nonce" }
cdata {
cdata_regex: "body ?{opacity: ?1}"
}
spec_url: "https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md"
}
tags: {
html_format: AMP
html_format: EXPERIMENTAL
tag_name: "STYLE"
spec_name: "head > style[amp-boilerplate]"
satisfies: "head > style[amp-boilerplate]"
mandatory_alternatives: "head > style[amp-boilerplate]"
unique: true
mandatory_parent: "HEAD"
requires: "noscript > style[amp-boilerplate]"
attrs: {
name: "amp-boilerplate"
mandatory: true
value: ""
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attrs: { name: "nonce" }
cdata: {
# This regex allows arbitrary whitespace whenever some whitespace
# is required in the boilerplate. It was made by replacing ' ' with \\s+.
cdata_regex: "\\s*body\\s*{\\s*-webkit-animation:\\s*-amp-start\\s+8s\\s+steps\\(1,\\s*end\\)\\s+0s\\s+1\\s+normal\\s+both;\\s*-moz-animation:\\s*-amp-start\\s+8s\\s+steps\\s*\\(1\\s*,\\s*end\\s*\\)\\s+0s\\s+1\\s+normal\\s+both;\\s*-ms-animation:\\s*-amp-start\\s+8s\\s+steps\\s*\\(1\\s*,\\s*end\\s*\\)\\s+0s\\s+1\\s+normal\\s+both;\\s*animation:\\s*-amp-start\\s+8s\\s+steps\\(1,\\s*end\\)\\s+0s\\s+1\\s+normal\\s+both;?\\s*}\\s*@-webkit-keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*@-moz-keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*@-ms-keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*@-o-keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*@keyframes\\s+-amp-start\\s*{\\s*from\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*to\\s*{\\s*visibility:\\s*visible;?\\s*}\\s*}\\s*"
}
spec_url: "https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md"
}
tags: {
html_format: AMP4ADS
tag_name: "STYLE"
spec_name: "head > style[amp4ads-boilerplate]"
mandatory: true
unique: true
mandatory_parent: "HEAD"
attrs: {
name: "amp4ads-boilerplate"
mandatory: true
value: ""
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attrs: { name: "nonce" }
cdata: {
# This regex allows arbitrary whitespace around the body statement, but
# not inside it. This is a compromise to keep things simple, but allow
# pretty printing tools some latitude.
cdata_regex: "\\s*body\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*"
}
spec_url: "https://github.com/ampproject/amphtml/blob/master/extensions/amp-a4a/amp-a4a-format.md#boilerplate"
}
tags: {
html_format: AMP4EMAIL
tag_name: "STYLE"
spec_name: "head > style[amp4email-boilerplate]"
mandatory: true
unique: true
mandatory_parent: "HEAD"
attrs: {
name: "amp4email-boilerplate"
mandatory: true
value: ""
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attrs: { name: "nonce" }
cdata: {
# This regex allows arbitrary whitespace whenever some whitespace
# is required in the boilerplate. It was made by replacing ' ' with \\s+.
cdata_regex: "\\s*body\\s*{\\s*visibility:\\s*hidden;?\\s*}\\s*"
}
spec_url: "https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md"
}
tags: {
html_format: AMP
html_format: EXPERIMENTAL
tag_name: "STYLE"
spec_name: "noscript > style[amp-boilerplate]"
satisfies: "noscript > style[amp-boilerplate]"
mandatory_alternatives: "noscript > style[amp-boilerplate]"
unique: true
mandatory_parent: "NOSCRIPT"
mandatory_ancestor: "HEAD"
requires: "head > style[amp-boilerplate]"
attrs: {
name: "amp-boilerplate"
mandatory: true
value: ""
dispatch_key: NAME_VALUE_PARENT_DISPATCH
}
attrs: { name: "nonce" }
cdata {
cdata_regex: "\\s*body\\s*{\\s*-webkit-animation:\\s*none;\\s*-moz-animation:\\s*none;\\s*-ms-animation:\\s*none;\\s*animation:\\s*none;?\\s*}\\s*"
}
spec_url: "https://github.com/ampproject/amphtml/blob/master/spec/amp-boilerplate.md"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "STYLE"
spec_name: "style[amp-keyframes]"
unique: true
mandatory_parent: "BODY"
mandatory_last_child: true
attrs: {
name: "amp-keyframes"
value: ""
mandatory: true
dispatch_key: NAME_DISPATCH
}
cdata: {
max_bytes: 500000
max_bytes_spec_url: "https://www.ampproject.org/docs/reference/spec#keyframes-stylesheet"
css_spec: {
at_rule_spec: {
name: 'keyframes'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: 'media'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: 'supports'
type: PARSE_AS_RULES
}
at_rule_spec: {
name: '$DEFAULT' # matches if none of the above match
type: PARSE_AS_ERROR
}
validate_keyframes: true
declaration: "animation-timing-function"
declaration: "offset-distance"
declaration: "opacity"
declaration: "transform"
declaration: "visibility"
}
}
}
# 4.3 Sections
# 4.3.1 The body element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "BODY"
mandatory: true
unique: true
mandatory_parent: "HTML"
spec_url: "https://www.ampproject.org/docs/reference/spec#required-markup"
}
# 4.3.2 The article element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "ARTICLE"
}
# 4.3.3 The section element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "SECTION"
disallowed_ancestor: "AMP-ACCORDION"
}
# 4.3.4 The nav element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "NAV"
}
# 4.3.5 The aside element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "ASIDE"
}
# 4.3.6 The h1, h2, h3, h4, h5, and h6 elements
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "H1"
attrs: { name: "align" }
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "H2"
attrs: { name: "align" }
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "H3"
attrs: { name: "align" }
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "H4"
attrs: { name: "align" }
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "H5"
attrs: { name: "align" }
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "H6"
attrs: { name: "align" }
}
# 4.3 7 The header element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "HEADER"
}
# 4.3 7 The footer element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "FOOTER"
}
# 4.3 7 The address element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "ADDRESS"
}
# 4.4 Grouping Content
# 4.4.1 The p element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "P"
attrs: { name: "align" }
}
# 4.4.2 The hr element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "HR"
}
# 4.4.3 The pre element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "PRE"
}
# 4.4.4 The blockquote element
attr_lists: {
name: "cite-attr"
attrs: {
name: "cite"
value_url: {
protocol: "http"
protocol: "https"
allow_empty: true
}
blacklisted_value_regex: "__amp_source_origin"
}
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "BLOCKQUOTE"
attrs: { name: "align" }
attr_lists: "cite-attr"
}
# 4.4.5 The ol element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "OL"
attrs: {
name: "reversed"
value: ""
}
attrs: {
name: "start"
value_regex: "[0-9]*"
}
attrs: {
name: "type"
value_regex: "[1AaIi]"
}
}
# 4.4.6 The ul element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "UL"
}
# 4.4.7 The li element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "LI"
attrs: {
name: "value"
value_regex: "[0-9]*"
}
}
# 4.4.8 The dl element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DL"
}
# 4.4.9 The dt element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DT"
}
# 4.4.10 The dd element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DD"
}
# 4.4.11 The figure element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "FIGURE"
}
# 4.4.12 The figcaption element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "FIGCAPTION"
}
# 4.4.13 The div element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DIV"
attrs: { name: "align" }
}
# 4.4.14 The main element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "MAIN"
}
# 4.5 Text-level semantics
# 4.5.1 The a element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "A"
attrs: { name: "border" } # Not valid html5 but commonly used and supported.
attrs: { name: "download" }
attrs: {
name: "href"
value_url: {
protocol: "ftp"
protocol: "geo"
protocol: "http"
protocol: "https"
protocol: "mailto"
protocol: "maps"
# Whitelisting additional commonly observed third party
# protocols which should be safe.
# BiP Messenger
protocol: "bip"
# Blackberry messenger
# (http://devblog.blackberry.com/2015/02/cross-platform-sharing-with-bbm/)
protocol: "bbmi"
protocol: "fb-messenger"
protocol: "intent"
# Line messenger (https://media.line.me/howto/en/)
protocol: "line"
protocol: "skype"
protocol: "sms"
protocol: "snapchat"
protocol: "tel"
protocol: "tg"
protocol: "threema"
protocol: "twitter"
protocol: "viber"
protocol: "webcal"
protocol: "web+mastodon" # See GitHub issue #14793
protocol: "whatsapp"
allow_empty: true
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "hreflang" }
attrs: { name: "media" }
attrs: { name: "name" } # Not valid html5 but commonly used and supported.
attrs: { name: "referrerpolicy" }
attrs: {
name: "rel"
# There are a wide variety of link rel attribute values used in the wild as
# this attribute is used as meta-data for any html client such as search
# engines. Unfortunately, there are also a number of attribute values which
# have behavioral impacts in modern browsers. A few places where these are
# loosely documented include:
# - http://microformats.org/wiki/existing-rel-values
# - http://www.iana.org/assignments/link-relations/link-relations.xhtml
# - https://html.spec.whatwg.org/#linkTypes
# We blacklist a few specific values which have browser behavior that could
# negatively impact performance.
# TODO(gregable): This could be improved such that the error message would
# report which value in a list is the one causing problems.
blacklisted_value_regex: "(^|\\s)(" # Values are space separated.
"components|"
"dns-prefetch|"
"import|"
"manifest|"
"preconnect|"
"prefetch|"
"preload|"
"prerender|"
"serviceworker|"
"stylesheet|" # Only allowed for link tags, specific req's for AMP.
"subresource|"
")(\\s|$)"
}
attrs: {
name: "role"
implicit: true
}
attrs: {
name: "tabindex"
implicit: true
}
attrs: {
name: "target"
value: "_blank"
value: "_self"
value: "_top"
}
attrs: {
name: "type"
value_casei: "text/html"
}
# <amp-bind>
attrs: { name: "[href]" }
spec_url: "https://www.ampproject.org/docs/reference/spec#links"
}
# AMP4EMAIL restricts the use of mustache delimiters in href. The only allowed
# protocols for href are https and mailto. Relative urls are disallowed.
tags: {
html_format: AMP4EMAIL
tag_name: "A"
spec_name: "A (AMP4EMAIL)"
attrs: { name: "border" } # Not valid html5 but commonly used and supported.
attrs: {
name: "href"
value_url: {
protocol: "https"
protocol: "mailto"
allow_relative: false
}
# Openning doubly curly brackets {{ (these are mustache delimiters) can only
# appear at the beginnig of the attribute's value. Likewise closing doubly
# curly brackets }} can only appear at the end of the attribute's value.
# Furthermore unbalanced delimiters are not allowed.
# Additionally section mustache delimiters, i.e., {{#, {{^, {{/ are
# disallowed.
blacklisted_value_regex: "__amp_source_origin|"
"(.|\\s){{|" # Openning delimiter can only appear at the beginning.
"}}(.|\\s)|" # Closing delimiter can only appear at the end.
"^{{.*[^}][^}]$|" # Delimiters must be balanced.
"^[^{][^{].*}}$|" # Delimiters must be balanced.
"^}}|" # Also caught by the requirements on balanced delimiters.
"{{$|" # Also caught by the requirements on balanced delimiters.
"{{#|" # Section delimiters are disallowed.
"{{/|" # Section delimiters are disallowed.
"{{\\^" # Section delimiters are disallowed.
}
attrs: { name: "hreflang" }
# TODO(gregable): Specify the set of allowed media queries.
attrs: { name: "media" }
attrs: { name: "name" } # Not valid html5 but commonly used and supported.
attrs: {
name: "role"
implicit: true
}
attrs: {
name: "tabindex"
implicit: true
}
attrs: {
name: "target"
value: "_blank"
}
attrs: {
name: "type"
value_casei: "text/html"
}
}
# 4.5.2 The em element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "EM"
}
# 4.5.3 The strong element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "STRONG"
}
# 4.5.4 The small element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "SMALL"
}
# 4.5.5 The s element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "S"
}
# 4.5.6 The cite element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "CITE"
}
# 4.5.7 The q element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "Q"
attr_lists: "cite-attr"
}
# 4.5.8 The dfn element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DFN"
}
# 4.5.9 The abbr element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "ABBR"
}
# 4.5.10 The data element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DATA"
}
# 4.5.11 The time element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "TIME"
attrs: {
name: "datetime"
}
}
# 4.5.12 The code element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "CODE"
}
# 4.5.13 The var element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "VAR"
}
# 4.5.14 The samp element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "SAMP"
}
# 4.5.15 The kbd element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "KBD"
}
# 4.5.16 The sub and sup elements
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "SUB"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "SUP"
}
# 4.5.17 The i element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "I"
}
# 4.5.18 The b element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "B"
}
# 4.5.19 The u element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "U"
}
# 4.5.20 The mark element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "MARK"
}
# 4.5.21 The ruby element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "RUBY"
}
# 4.5.22 The rb element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "RB"
}
# 4.5.23 The rt element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "RT"
}
# 4.5.24 The rtc element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "RTC"
}
# 4.5.25 The rp element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "RP"
}
# 4.5.26 The bdi element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "BDI"
}
# 4.5.27 The bdo element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "BDO"
attrs: { name: "dir" }
}
# 4.5.28 The span element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "SPAN"
}
# 4.5.29 The br element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "BR"
}
# 4.5.30 The wbr element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "WBR"
}
# 4.6 Edits
# 4.6.1 The ins element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "INS"
# https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins
# These attributes have specific formatting, but as they are metadata
# that can't hurt performance, rendering or security, we don't validate
# the values.
attrs { name: "datetime" }
attr_lists: "cite-attr"
}
# 4.6.2 The del element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DEL"
# https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del
# These attributes have specific formatting, but as they are metadata
# that can't hurt performance, rendering or security, we don't validate
# the values.
attrs { name: "datetime" }
attr_lists: "cite-attr"
}
# 4.7 Embedded Content
# AMP HTML allows embedded content only via its own tags (e.g. amp-img), with
# the exception of tags inside of a <noscript> ancestor.
# 4.7.1 The img element
tags: {
html_format: AMP # Disallowed in AMP4ADS because <noscript> is disallowed.
tag_name: "IMG"
mandatory_ancestor: "NOSCRIPT"
mandatory_ancestor_suggested_alternative: "AMP-IMG"
spec_url: "https://www.ampproject.org/docs/reference/components/amp-img"
attrs: { name: "alt" }
attrs: { name: "border" } # Not valid html5 but commonly used and supported.
attrs: { name: "height" } # Not valid html5 but commonly used and supported.
attrs: { name: "ismap" }
attrs: {
name: "longdesc"
value_url: {
protocol: "http"
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: {
name: "src"
alternative_names: "srcset"
mandatory: true
value_url: {
protocol: "data"
protocol: "https"
allow_relative: true # Will be set to false at a future date.
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "width" } # Not valid html5 but commonly used and supported.
}
# 4.7.2 The iframe element
tags: {
html_format: AMP # Disallowed in AMP4ADS because <noscript> is disallowed.
tag_name: "IFRAME"
mandatory_ancestor: "NOSCRIPT"
mandatory_ancestor_suggested_alternative: "AMP-IFRAME"
spec_url: "https://www.ampproject.org/docs/reference/components/amp-iframe"
attrs: {
name: "frameborder"
value: "0"
value: "1"
}
attrs: { name: "height" }
attrs: { name: "name" }
attrs: { name: "referrerpolicy" }
attrs: {
name: "resizable"
value: ""
}
attrs: {
name: "sandbox"
}
attrs: {
name: "scrolling"
value: "auto"
value: "yes"
value: "no"
}
attrs: {
name: "src"
mandatory_oneof: "['src', 'srcdoc']"
value_url: {
protocol: "data"
protocol: "https"
allow_relative: false
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: {
name: "srcdoc"
mandatory_oneof: "['src', 'srcdoc']"
}
attrs: {
name: "width"
}
}
# 4.7.6 The video element
# Only allowed in noscript tags. Otherwise use amp-video.
tags: {
html_format: AMP # Disallowed in AMP4ADS because <noscript> is disallowed.
tag_name: "VIDEO"
mandatory_ancestor: "NOSCRIPT"
mandatory_ancestor_suggested_alternative: "AMP-VIDEO"
attrs: { name: "autoplay" }
attrs: { name: "controls" }
attrs: { name: "height" }
attrs: { name: "loop" }
attrs: {
name: "muted"
deprecation: "autoplay"
deprecation_url: "https://www.ampproject.org/docs/reference/components/amp-video"
}
attrs: { name: "playsinline" }
attrs: { name: "poster" }
attrs: { name: "preload" }
attrs: {
name: "src"
value_url: {
protocol: "data"
protocol: "https"
allow_relative: false
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "width" }
spec_url: "https://www.ampproject.org/docs/reference/components/amp-video"
}
# 4.7.7 The audio element
# Only allowed in noscript tags. Otherwise use amp-audio.
tags: {
html_format: AMP # Disallowed in AMP4ADS because <noscript> is disallowed.
tag_name: "AUDIO"
mandatory_ancestor: "NOSCRIPT"
mandatory_ancestor_suggested_alternative: "AMP-AUDIO"
attrs: { name: "autoplay" }
attrs: { name: "controls" }
attrs: { name: "loop" }
attrs: { name: "muted" }
attrs: { name: "preload" }
attrs: {
name: "src"
value_url: {
protocol: "data"
protocol: "https"
allow_relative: false
}
blacklisted_value_regex: "__amp_source_origin"
}
spec_url: "https://www.ampproject.org/docs/reference/components/amp-audio"
}
# 4.7.8 The source element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SOURCE"
spec_name: "amp-video > source"
mandatory_parent: "AMP-VIDEO"
attrs: { name: "media" }
attrs: {
name: "src"
value_url: {
protocol: "https"
allow_relative: true # Will be set to false at a future date.
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "type" }
# <amp-bind>
attrs: { name: "[src]" }
attrs: { name: "[type]" }
spec_url: "https://www.ampproject.org/docs/reference/components/amp-video"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SOURCE"
spec_name: "amp-audio > source"
mandatory_parent: "AMP-AUDIO"
attrs: { name: "media" }
attrs: {
name: "src"
value_url: {
protocol: "https"
allow_relative: true # Will be set to false at a future date.
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "type" }
# <amp-bind>
attrs: { name: "[src]" }
attrs: { name: "[type]" }
spec_url: "https://www.ampproject.org/docs/reference/components/amp-audio"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SOURCE"
spec_name: "audio > source"
mandatory_parent: "AUDIO"
attrs: { name: "media" }
attrs: {
name: "src"
mandatory: true
value_url: {
protocol: "https"
allow_relative: true # Will be set to false at a future date.
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: {
name: "type"
mandatory: true
}
spec_url: "https://www.ampproject.org/docs/reference/components/amp-audio"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SOURCE"
spec_name: "video > source"
mandatory_parent: "VIDEO"
attrs: { name: "media" }
attrs: {
name: "src"
mandatory: true
value_url: {
protocol: "https"
allow_relative: true # Will be set to false at a future date.
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: {
name: "type"
mandatory: true
}
spec_url: "https://www.ampproject.org/docs/reference/components/amp-video"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SOURCE"
spec_name: "amp-ima-video > source"
mandatory_parent: "AMP-IMA-VIDEO"
requires_extension: "amp-ima-video"
attrs: { name: "media" }
attrs: {
name: "src"
value_url: {
protocol: "https"
allow_relative: true # Will be set to false at a future date.
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "type" }
# <amp-bind>
attrs: { name: "[src]" }
attrs: { name: "[type]" }
}
# 4.7.8 The track element
# We have two attr_list variants to encode the requirement that if
# the attribute kind has the value 'subtitles', then the tag must
# also have a srclang attribute. The first attr_list does not allow
# kind=subtitles, but srclang is optional. The second attr_list
# mandates kind=subtitles and srclang attributes.
attr_lists: {
name: "track-attrs-no-subtitles"
attrs: {
name: "default"
value: ""
}
attrs: {
name: "kind"
value: "captions"
value: "chapters"
value: "descriptions"
value: "metadata"
}
attrs: { name: "label" }
attrs: {
name: "src"
mandatory: true
value_url: {
protocol: "https"
allow_relative: false
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "srclang" }
}
attr_lists: {
name: "track-attrs-subtitles"
attrs: {
name: "default"
value: ""
}
attrs: {
name: "kind"
mandatory: true
value_casei: "subtitles"
}
attrs: { name: "label" }
attrs: {
name: "src"
mandatory: true
value_url: {
protocol: "https"
allow_relative: false
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: {
name: "srclang"
mandatory: true
}
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "audio > track"
mandatory_parent: "AUDIO"
attr_lists: "track-attrs-no-subtitles"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "audio > track[kind=subtitles]"
mandatory_parent: "AUDIO"
attr_lists: "track-attrs-subtitles"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "video > track"
mandatory_parent: "VIDEO"
attr_lists: "track-attrs-no-subtitles"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "video > track[kind=subtitles]"
mandatory_parent: "VIDEO"
attr_lists: "track-attrs-subtitles"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "amp-audio > track"
mandatory_parent: "AMP-AUDIO"
# <amp-bind>
attrs: { name: "[label]" }
attrs: { name: "[src]" }
attrs: { name: "[srclang]" }
attr_lists: "track-attrs-no-subtitles"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "amp-audio > track[kind=subtitles]"
mandatory_parent: "AMP-AUDIO"
# <amp-bind>
attrs: { name: "[label]" }
attrs: { name: "[src]" }
attrs: { name: "[srclang]" }
attr_lists: "track-attrs-subtitles"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "amp-video > track"
mandatory_parent: "AMP-VIDEO"
# <amp-bind>
attrs: { name: "[label]" }
attrs: { name: "[src]" }
attrs: { name: "[srclang]" }
attr_lists: "track-attrs-no-subtitles"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "amp-video > track[kind=subtitles]"
mandatory_parent: "AMP-VIDEO"
# <amp-bind>
attrs: { name: "[label]" }
attrs: { name: "[src]" }
attrs: { name: "[srclang]" }
attr_lists: "track-attrs-subtitles"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TRACK"
spec_name: "amp-ima-video > track[kind=subtitles]"
mandatory_parent: "AMP-IMA-VIDEO"
# <amp-bind>
attrs: { name: "[label]" }
attrs: { name: "[src]" }
attrs: { name: "[srclang]" }
attr_lists: "track-attrs-subtitles"
spec_url: "https://www.ampproject.org/docs/reference/components/amp-ima-video"
}
# 4.7.15 SVG
# We allow some limited embedded SVG tags. We do not allow inline styles
# or embedding any external resources.
# Attribute lists: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
attr_lists: {
name: "svg-conditional-processing-attributes"
attrs: { name: "requiredextensions" }
attrs: { name: "requiredfeatures" }
attrs: { name: "systemlanguage" }
}
attr_lists: {
name: "svg-core-attributes"
attrs: { name: "xml:lang" }
attrs: { name: "xml:space" }
attrs: { name: "xmlns" }
attrs: { name: "xmlns:xlink" }
}
attr_lists: {
name: "svg-filter-primitive-attributes"
attrs: { name: "height" }
attrs: { name: "result" }
attrs: { name: "width" }
attrs: { name: "x" }
attrs: { name: "y" }
}
attr_lists: {
name: "svg-presentation-attributes"
attrs: { name: "alignment-baseline" }
attrs: { name: "baseline-shift" }
attrs: { name: "clip" }
attrs: { name: "clip-path" }
attrs: { name: "clip-rule" }
attrs: { name: "color" }
attrs: { name: "color-interpolation" }
attrs: { name: "color-interpolation-filters" }
attrs: { name: "color-profile" }
attrs: { name: "color-rendering" }
attrs: { name: "cursor" }
attrs: { name: "direction" }
attrs: { name: "display" }
attrs: { name: "dominant-baseline" }
attrs: { name: "enable-background" }
attrs: { name: "fill" }
attrs: { name: "fill-opacity" }
attrs: { name: "fill-rule" }
attrs: { name: "filter" }
attrs: { name: "flood-color" }
attrs: { name: "flood-opacity" }
attrs: { name: "font-family" }
attrs: { name: "font-size" }
attrs: { name: "font-size-adjust" }
attrs: { name: "font-stretch" }
attrs: { name: "font-style" }
attrs: { name: "font-variant" }
attrs: { name: "font-weight" }
attrs: { name: "glyph-orientation-horizontal" }
attrs: { name: "glyph-orientation-vertical" }
attrs: { name: "image-rendering" }
attrs: { name: "kerning" }
attrs: { name: "letter-spacing" }
attrs: { name: "lighting-color" }
attrs: { name: "marker-end" }
attrs: { name: "marker-mid" }
attrs: { name: "marker-start" }
attrs: { name: "mask" }
attrs: { name: "opacity" }
attrs: { name: "overflow" }
attrs: { name: "pointer-events" }
attrs: { name: "shape-rendering" }
attrs: { name: "stop-color" }
attrs: { name: "stop-opacity" }
attrs: { name: "stroke" }
attrs: { name: "stroke-dasharray" }
attrs: { name: "stroke-dashoffset" }
attrs: { name: "stroke-linecap" }
attrs: { name: "stroke-linejoin" }
attrs: { name: "stroke-miterlimit" }
attrs: { name: "stroke-opacity" }
attrs: { name: "stroke-width" }
attrs: { name: "text-anchor" }
attrs: { name: "text-decoration" }
attrs: { name: "text-rendering" }
attrs: { name: "unicode-bidi" }
attrs: { name: "vector-effect" }
attrs: { name: "visibility" }
attrs: { name: "word-spacing" }
attrs: { name: "writing-mode" }
}
attr_lists: {
name: "svg-transfer-function-attributes"
attrs: { name: "amplitude" }
attrs: { name: "exponent" }
attrs: { name: "intercept" }
attrs: { name: "offset" }
attrs: { name: "slope" }
attrs: { name: "table" }
attrs: { name: "tablevalues" }
}
attr_lists: {
name: "svg-xlink-attributes"
attrs: { name: "xlink:actuate" }
attrs: { name: "xlink:arcrole" }
attrs: {
name: "xlink:href"
# xlink:href is deprecated since SVG2 in favor of href.
alternative_names: "href"
value_url: {
protocol: "http"
protocol: "https"
allow_empty: false
}
}
attrs: { name: "xlink:role" }
attrs: { name: "xlink:show" }
attrs: { name: "xlink:title" }
attrs: { name: "xlink:type" }
}
# Style attributes are broadly disallowed, but specifically allowed
# within SVG as SVG are commonly generated by tools.
attr_lists: {
name: "svg-style-attr"
attrs: {
name: "style"
blacklisted_value_regex: "!important"
# CSS proprities: https://www.w3schools.com/cssref/default.asp
# SVG specific properties: https://www.w3.org/TR/SVG11/styling.html#SVGStylingProperties
# Disallowed:
# css_declaration: { name: "@charset" }
# css_declaration: { name: "@font-face" }
# css_declaration: { name: "@font-feature-values" }
# css_declaration: { name: "@import" }
# css_declaration: { name: "@keyframes" }
# css_declaration: { name: "@media" }
# Allowed:
css_declaration: { name: "align-content" }
css_declaration: { name: "align-items" }
css_declaration: { name: "align-self" }
css_declaration: { name: "alignment-baseline" } # SVG
css_declaration: { name: "all" }
css_declaration: { name: "animation" }
css_declaration: { name: "animation-delay" }
css_declaration: { name: "animation-direction" }
css_declaration: { name: "animation-duration" }
css_declaration: { name: "animation-fill-mode" }
css_declaration: { name: "animation-iteration-count" }
css_declaration: { name: "animation-name" }
css_declaration: { name: "animation-play-state" }
css_declaration: { name: "animation-timing-function" }
css_declaration: { name: "backface-visibility" }
css_declaration: { name: "background" }
css_declaration: { name: "background-attachment" }
css_declaration: { name: "background-blend-mode" }
css_declaration: { name: "background-clip" }
css_declaration: { name: "background-color" }
css_declaration: { name: "background-image" }
css_declaration: { name: "background-origin" }
css_declaration: { name: "background-position" }
css_declaration: { name: "background-repeat" }
css_declaration: { name: "background-size" }
css_declaration: { name: "baseline-shift" } # SVG
css_declaration: { name: "border" }
css_declaration: { name: "border-bottom" }
css_declaration: { name: "border-bottom-color" }
css_declaration: { name: "border-bottom-left-radius" }
css_declaration: { name: "border-bottom-right-radius" }
css_declaration: { name: "border-bottom-style" }
css_declaration: { name: "border-bottom-width" }
css_declaration: { name: "border-collapse" }
css_declaration: { name: "border-color" }
css_declaration: { name: "border-image" }
css_declaration: { name: "border-image-outset" }
css_declaration: { name: "border-image-repeat" }
css_declaration: { name: "border-image-slice" }
css_declaration: { name: "border-image-source" }
css_declaration: { name: "border-image-width" }
css_declaration: { name: "border-left" }
css_declaration: { name: "border-left-color" }
css_declaration: { name: "border-left-style" }
css_declaration: { name: "border-left-width" }
css_declaration: { name: "border-radius" }
css_declaration: { name: "border-right" }
css_declaration: { name: "border-right-color" }
css_declaration: { name: "border-right-style" }
css_declaration: { name: "border-right-width" }
css_declaration: { name: "border-spacing" }
css_declaration: { name: "border-style" }
css_declaration: { name: "border-top" }
css_declaration: { name: "border-top-color" }
css_declaration: { name: "border-top-left-radius" }
css_declaration: { name: "border-top-right-radius" }
css_declaration: { name: "border-top-style" }
css_declaration: { name: "border-top-width" }
css_declaration: { name: "border-width" }
css_declaration: { name: "bottom" }
css_declaration: { name: "box-decoration-break" }
css_declaration: { name: "box-shadow" }
css_declaration: { name: "box-sizing" }
css_declaration: { name: "break-after" }
css_declaration: { name: "break-before" }
css_declaration: { name: "break-inside" }
css_declaration: { name: "caption-side" }
css_declaration: { name: "caret-color" }
css_declaration: { name: "clear" }
css_declaration: { name: "clip" }
css_declaration: { name: "clip-path" } # SVG
css_declaration: { name: "clip-rule" } # SVG
css_declaration: { name: "color" }
css_declaration: { name: "color-interpolation" } # SVG
css_declaration: { name: "color-interpolation-filters" } # SVG
css_declaration: { name: "color-profile" } # SVG
css_declaration: { name: "color-rendering" } # SVG
css_declaration: { name: "column-count" }
css_declaration: { name: "column-fill" }
css_declaration: { name: "column-gap" }
css_declaration: { name: "column-rule" }
css_declaration: { name: "column-rule-color" }
css_declaration: { name: "column-rule-style" }
css_declaration: { name: "column-rule-width" }
css_declaration: { name: "column-span" }
css_declaration: { name: "column-width" }
css_declaration: { name: "columns" }
css_declaration: { name: "content" }
css_declaration: { name: "counter-increment" }
css_declaration: { name: "counter-reset" }
css_declaration: { name: "cursor" }
css_declaration: { name: "direction" }
css_declaration: { name: "display" }
css_declaration: { name: "dominant-baseline" } # SVG
css_declaration: { name: "empty-cells" }
css_declaration: { name: "enable-background" } # SVG
css_declaration: { name: "fill" } # SVG
css_declaration: { name: "fill-opacity" } # SVG
css_declaration: { name: "fill-rule" } # SVG
css_declaration: { name: "filter" }
css_declaration: { name: "flex" }
css_declaration: { name: "flex-basis" }
css_declaration: { name: "flex-direction" }
css_declaration: { name: "flex-flow" }
css_declaration: { name: "flex-grow" }
css_declaration: { name: "flex-shrink" }
css_declaration: { name: "flex-wrap" }
css_declaration: { name: "float" }
css_declaration: { name: "flood-color" } # SVG
css_declaration: { name: "flood-opacity" } # SVG
css_declaration: { name: "font" }
css_declaration: { name: "font-family" }
css_declaration: { name: "font-feature-settings" }
css_declaration: { name: "font-kerning" }
css_declaration: { name: "font-language-override" }
css_declaration: { name: "font-size" }
css_declaration: { name: "font-size-adjust" }
css_declaration: { name: "font-stretch" }
css_declaration: { name: "font-style" }
css_declaration: { name: "font-synthesis" }
css_declaration: { name: "font-variant" }
css_declaration: { name: "font-variant-alternates" }
css_declaration: { name: "font-variant-caps" }
css_declaration: { name: "font-variant-east-asian" }
css_declaration: { name: "font-variant-ligatures" }
css_declaration: { name: "font-variant-numeric" }
css_declaration: { name: "font-variant-position" }
css_declaration: { name: "font-weight" }
css_declaration: { name: "glyph-orientation-horizontal" } # SVG
css_declaration: { name: "glyph-orientation-vertical" } # SVG
css_declaration: { name: "grid" }
css_declaration: { name: "grid-area" }
css_declaration: { name: "grid-auto-columns" }
css_declaration: { name: "grid-auto-flow" }
css_declaration: { name: "grid-auto-rows" }
css_declaration: { name: "grid-column" }
css_declaration: { name: "grid-column-end" }
css_declaration: { name: "grid-column-gap" }
css_declaration: { name: "grid-column-start" }
css_declaration: { name: "grid-gap" }
css_declaration: { name: "grid-row" }
css_declaration: { name: "grid-row-end" }
css_declaration: { name: "grid-row-gap" }
css_declaration: { name: "grid-row-start" }
css_declaration: { name: "grid-template" }
css_declaration: { name: "grid-template-areas" }
css_declaration: { name: "grid-template-columns" }
css_declaration: { name: "grid-template-rows" }
css_declaration: { name: "hanging-punctuation" }
css_declaration: { name: "height" }
css_declaration: { name: "hyphens" }
css_declaration: { name: "image-rendering" }
css_declaration: { name: "isolation" }
css_declaration: { name: "justify-content" }
css_declaration: { name: "kerning" } # SVG
css_declaration: { name: "left" }
css_declaration: { name: "letter-spacing" }
css_declaration: { name: "lighting-color" } # SVG
css_declaration: { name: "line-break" }
css_declaration: { name: "line-height" }
css_declaration: { name: "list-style" }
css_declaration: { name: "list-style-image" }
css_declaration: { name: "list-style-position" }
css_declaration: { name: "list-style-type" }
css_declaration: { name: "margin" }
css_declaration: { name: "margin-bottom" }
css_declaration: { name: "margin-left" }
css_declaration: { name: "margin-right" }
css_declaration: { name: "margin-top" }
css_declaration: { name: "marker" } # SVG
css_declaration: { name: "marker-end" } # SVG
css_declaration: { name: "marker-mid" } # SVG
css_declaration: { name: "marker-start" } # SVG
css_declaration: { name: "mask" } # SVG
css_declaration: { name: "max-height" }
css_declaration: { name: "max-width" }
css_declaration: { name: "min-height" }
css_declaration: { name: "min-width" }
css_declaration: { name: "mix-blend-mode" }
css_declaration: { name: "object-fit" }
css_declaration: { name: "object-position" }
css_declaration: { name: "opacity" }
css_declaration: { name: "order" }
css_declaration: { name: "orphans" }
css_declaration: { name: "outline" }
css_declaration: { name: "outline-color" }
css_declaration: { name: "outline-offset" }
css_declaration: { name: "outline-style" }
css_declaration: { name: "outline-width" }
css_declaration: { name: "overflow" }
css_declaration: { name: "overflow-wrap" }
css_declaration: { name: "overflow-x" }
css_declaration: { name: "overflow-y" }
css_declaration: { name: "padding" }
css_declaration: { name: "padding-bottom" }
css_declaration: { name: "padding-left" }
css_declaration: { name: "padding-right" }
css_declaration: { name: "padding-top" }
css_declaration: { name: "page-break-after" }
css_declaration: { name: "page-break-before" }
css_declaration: { name: "page-break-inside" }
css_declaration: { name: "perspective" }
css_declaration: { name: "perspective-origin" }
css_declaration: { name: "pointer-events" }
# CSS property `position` with values `fixed` and `sticky are not allowed.
# From https://www.w3schools.com/cssref/pr_class_position.asp
css_declaration: {
name: "position"
value_casei: "absolute"
value_casei: "inherit"
value_casei: "initial"
value_casei: "relative"
value_casei: "static"
}
css_declaration: { name: "quotes" }
css_declaration: { name: "resize" }
css_declaration: { name: "right" }
css_declaration: { name: "shape-rendering" } # SVG
css_declaration: { name: "stop-color" } # SVG
css_declaration: { name: "stop-opacity" } # SVG
css_declaration: { name: "stroke" } # SVG
css_declaration: { name: "stroke-dasharray" } # SVG
css_declaration: { name: "stroke-dashoffset" } # SVG
css_declaration: { name: "stroke-linecap" } # SVG
css_declaration: { name: "stroke-linejoin" } # SVG
css_declaration: { name: "stroke-miterlimit" } # SVG
css_declaration: { name: "stroke-opacity" } # SVG
css_declaration: { name: "stroke-width" } # SVG
css_declaration: { name: "tab-size" }
css_declaration: { name: "table-layout" }
css_declaration: { name: "text-align" }
css_declaration: { name: "text-align-last" }
css_declaration: { name: "text-anchor" } # SVG
css_declaration: { name: "text-combine-upright" }
css_declaration: { name: "text-decoration" }
css_declaration: { name: "text-decoration-color" }
css_declaration: { name: "text-decoration-line" }
css_declaration: { name: "text-decoration-style" }
css_declaration: { name: "text-indent" }
css_declaration: { name: "text-justify" }
css_declaration: { name: "text-orientation" }
css_declaration: { name: "text-overflow" }
css_declaration: { name: "text-rendering" } # SVG
css_declaration: { name: "text-shadow" }
css_declaration: { name: "text-transform" }
css_declaration: { name: "text-underline-position" }
css_declaration: { name: "top" }
css_declaration: { name: "transform" }
css_declaration: { name: "transform-origin" }
css_declaration: { name: "transform-style" }
css_declaration: { name: "transition" }
css_declaration: { name: "transition-delay" }
css_declaration: { name: "transition-duration" }
css_declaration: { name: "transition-property" }
css_declaration: { name: "transition-timing-function" }
css_declaration: { name: "unicode-bidi" }
css_declaration: { name: "user-select" }
css_declaration: { name: "vertical-align" }
css_declaration: { name: "visibility" }
css_declaration: { name: "white-space" }
css_declaration: { name: "widows" }
css_declaration: { name: "width" }
css_declaration: { name: "word-break" }
css_declaration: { name: "word-spacing" }
css_declaration: { name: "word-wrap" }
css_declaration: { name: "writing-mode" }
css_declaration: { name: "z-index" }
}
}
# Basics
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "G"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "transform" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "GLYPH"
mandatory_ancestor: "SVG"
attrs: { name: "arabic-form" }
attrs: { name: "d" }
attrs: { name: "glyph-name" }
attrs: { name: "horiz-adv-x" }
attrs: { name: "orientation" }
attrs: { name: "unicode" }
attrs: { name: "vert-adv-y" }
attrs: { name: "vert-origin-x" }
attrs: { name: "vert-origin-y" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "GLYPHREF"
mandatory_ancestor: "SVG"
attrs: { name: "dx" }
attrs: { name: "dy" }
attrs: { name: "format" }
attrs: { name: "glyphref" }
attrs: { name: "x" }
attrs: { name: "y" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
attr_lists: "svg-xlink-attributes"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "IMAGE"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "height" }
attrs: { name: "preserveaspectratio" }
attrs: { name: "transform" }
attrs: { name: "width" }
attrs: { name: "x" }
attrs: { name: "xlink:actuate" }
attrs: { name: "xlink:arcrole" }
attrs: {
name: "xlink:href"
# xlink:href is deprecated since SVG2 in favor of href.
alternative_names: "href"
value_url: {
protocol: "data"
protocol: "http"
protocol: "https"
allow_empty: false
}
# Inline SVGs execute in a different context and can affect page elements.
blacklisted_value_regex: "(^|\\s)data:image\\/svg\\+xml"
}
attrs: { name: "xlink:role" }
attrs: { name: "xlink:show" }
attrs: { name: "xlink:title" }
attrs: { name: "xlink:type" }
attrs: { name: "y" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "MARKER"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "markerheight" }
attrs: { name: "markerunits" }
attrs: { name: "markerwidth" }
attrs: { name: "orient" }
attrs: { name: "preserveaspectratio" }
attrs: { name: "refx" }
attrs: { name: "refy" }
attrs: { name: "transform" }
attrs: { name: "viewbox" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "METADATA"
mandatory_ancestor: "SVG"
attr_lists: "svg-core-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "PATH"
mandatory_ancestor: "SVG"
attrs: { name: "d" }
attrs: { name: "externalresourcesrequired" }
attrs: { name: "pathlength" }
attrs: { name: "sketch:type" }
attrs: { name: "transform" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SOLIDCOLOR"
mandatory_ancestor: "SVG"
attrs: { name: "solid-color" }
attrs: { name: "solid-opacity" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SVG"
attrs: { name: "contentscripttype" }
attrs: { name: "contentstyletype" }
attrs: { name: "externalresourcesrequired" }
attrs: { name: "height" }
attrs: { name: "preserveaspectratio" }
attrs: {
name: "version"
value: "1.0"
value: "1.1"
}
attrs: { name: "viewbox" }
attrs: { name: "width" }
attrs: { name: "x" }
attrs: { name: "y" }
attrs: { name: "zoomandpan" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SWITCH"
mandatory_ancestor: "SVG"
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "VIEW"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "preserveaspectratio" }
attrs: { name: "viewbox" }
attrs: { name: "viewtarget" }
attrs: { name: "zoomandpan" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
# Shapes
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "CIRCLE"
mandatory_ancestor: "SVG"
attrs: { name: "cx" }
attrs: { name: "cy" }
attrs: { name: "externalresourcesrequired" }
attrs: { name: "r" }
attrs: { name: "sketch:type" }
attrs: { name: "transform" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "ELLIPSE"
mandatory_ancestor: "SVG"
attrs: { name: "cx" }
attrs: { name: "cy" }
attrs: { name: "externalresourcesrequired" }
attrs: { name: "rx" }
attrs: { name: "ry" }
attrs: { name: "sketch:type" }
attrs: { name: "transform" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "LINE"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "sketch:type" }
attrs: { name: "transform" }
attrs: { name: "x1" }
attrs: { name: "x2" }
attrs: { name: "y1" }
attrs: { name: "y2" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "POLYGON"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "points" }
attrs: { name: "sketch:type" }
attrs: { name: "transform" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "POLYLINE"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "points" }
attrs: { name: "sketch:type" }
attrs: { name: "transform" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "RECT"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "height" }
attrs: { name: "rx" }
attrs: { name: "ry" }
attrs: { name: "sketch:type" }
attrs: { name: "transform" }
attrs: { name: "width" }
attrs: { name: "x" }
attrs: { name: "y" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
# Text
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TEXT"
mandatory_ancestor: "SVG"
attrs: { name: "dx" }
attrs: { name: "dy" }
attrs: { name: "externalresourcesrequired" }
attrs: { name: "lengthadjust" }
attrs: { name: "rotate" }
attrs: { name: "text-anchor" }
attrs: { name: "textlength" }
attrs: { name: "transform" }
attrs: { name: "x" }
attrs: { name: "y" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TEXTPATH"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "method" }
attrs: { name: "spacing" }
attrs: { name: "startoffset" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
attr_lists: "svg-xlink-attributes"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TREF"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
attr_lists: "svg-xlink-attributes"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TSPAN"
mandatory_ancestor: "SVG"
attrs: { name: "dx" }
attrs: { name: "dy" }
attrs: { name: "externalresourcesrequired" }
attrs: { name: "lengthadjust" }
attrs: { name: "rotate" }
attrs: { name: "textlength" }
attrs: { name: "x" }
attrs: { name: "y" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
# Rendering
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "CLIPPATH"
mandatory_ancestor: "SVG"
attrs: { name: "clippathunits" }
attrs: { name: "externalresourcesrequired" }
attrs: { name: "transform" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FILTER"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "filterres" }
attrs: { name: "filterunits" }
attrs: { name: "height" }
attrs: { name: "primitiveunits" }
attrs: { name: "width" }
attrs: { name: "x" }
attrs: { name: "y" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
attr_lists: "svg-xlink-attributes"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "HKERN"
mandatory_ancestor: "SVG"
attrs: { name: "g1" }
attrs: { name: "g2" }
attrs: { name: "k" }
attrs: { name: "u1" }
attrs: { name: "u2" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "LINEARGRADIENT"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "gradienttransform" }
attrs: { name: "gradientunits" }
attrs: { name: "spreadmethod" }
attrs: { name: "x1" }
attrs: { name: "x2" }
attrs: { name: "y1" }
attrs: { name: "y2" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
attr_lists: "svg-xlink-attributes"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "MASK"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "height" }
attrs: { name: "maskcontentunits" }
attrs: { name: "maskunits" }
attrs: { name: "width" }
attrs: { name: "x" }
attrs: { name: "y" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "PATTERN"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "height" }
attrs: { name: "patterncontentunits" }
attrs: { name: "patterntransform" }
attrs: { name: "patternunits" }
attrs: { name: "preserveaspectratio" }
attrs: { name: "viewbox" }
attrs: { name: "width" }
attrs: { name: "x" }
attrs: { name: "y" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
attr_lists: "svg-xlink-attributes"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "RADIALGRADIENT"
mandatory_ancestor: "SVG"
attrs: { name: "cx" }
attrs: { name: "cy" }
attrs: { name: "externalresourcesrequired" }
attrs: { name: "fr" }
attrs: { name: "fx" }
attrs: { name: "fy" }
attrs: { name: "gradienttransform" }
attrs: { name: "gradientunits" }
attrs: { name: "r" }
attrs: { name: "spreadmethod" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
attr_lists: "svg-xlink-attributes"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "STOP"
spec_name: "lineargradient > stop"
mandatory_ancestor: "LINEARGRADIENT"
attrs: { name: "offset" }
attrs: { name: "stop-color" }
attrs: { name: "stop-opacity" }
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "STOP"
spec_name: "radialgradient > stop"
mandatory_ancestor: "RADIALGRADIENT"
attrs: { name: "offset" }
attrs: { name: "stop-color" }
attrs: { name: "stop-opacity" }
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "VKERN"
mandatory_ancestor: "SVG"
attrs: { name: "g1" }
attrs: { name: "g2" }
attrs: { name: "k" }
attrs: { name: "u1" }
attrs: { name: "u2" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
# Special
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "DEFS"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "transform" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "SYMBOL"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "preserveaspectratio" }
attrs: { name: "viewbox" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "USE"
mandatory_ancestor: "SVG"
attrs: { name: "externalresourcesrequired" }
attrs: { name: "height" }
attrs: { name: "transform" }
attrs: { name: "width" }
attrs: { name: "x" }
attrs: { name: "y" }
attr_lists: "svg-conditional-processing-attributes"
attr_lists: "svg-core-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
attr_lists: "svg-xlink-attributes"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
# Filters
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FECOLORMATRIX"
mandatory_ancestor: "SVG"
attrs: { name: "in" }
attrs: { name: "type" }
attrs: { name: "values" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-filter-primitive-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FECOMPOSITE"
mandatory_ancestor: "SVG"
attrs: { name: "in" }
attrs: { name: "in2" }
attrs: { name: "k1" }
attrs: { name: "k2" }
attrs: { name: "k3" }
attrs: { name: "k4" }
attrs: { name: "operator" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-filter-primitive-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FEFLOOD"
mandatory_ancestor: "SVG"
attr_lists: "svg-core-attributes"
attr_lists: "svg-filter-primitive-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FEGAUSSIANBLUR"
mandatory_ancestor: "SVG"
attrs: { name: "edgemode" }
attrs: { name: "in" }
attrs: { name: "stddeviation" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-filter-primitive-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FEMERGE"
mandatory_ancestor: "SVG"
attr_lists: "svg-core-attributes"
attr_lists: "svg-filter-primitive-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FEMERGENODE"
mandatory_ancestor: "SVG"
attrs: { name: "in" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FEOFFSET"
mandatory_ancestor: "SVG"
attrs: { name: "dx" }
attrs: { name: "dy" }
attrs: { name: "in" }
attr_lists: "svg-core-attributes"
attr_lists: "svg-filter-primitive-attributes"
attr_lists: "svg-presentation-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
# ARIA
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "DESC"
mandatory_ancestor: "SVG"
attr_lists: "svg-core-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "TITLE"
spec_name: "svg title"
mandatory_ancestor: "SVG"
attr_lists: "svg-core-attributes"
attr_lists: "svg-style-attr"
spec_url: "https://www.ampproject.org/docs/reference/spec#svg"
}
# 4.8 Links
# Links are a concept, rather than a tag. See tagspecs for "LINK", "A", etc.
# 4.9 Tabular data
# 4.9.1 The table element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "TABLE"
attrs: { name: "align" } # Not valid html5 but commonly used and supported.
attrs: { name: "bgcolor" } # Not valid html5 but commonly used and supported.
attrs: { # Not valid html5 but commonly used and supported.
name: "border"
value: "0"
value: "1"
}
attrs: { name: "cellpadding" } # Not valid html5 but commonly used and supported.
attrs: { name: "cellspacing" } # Not valid html5 but commonly used and supported.
attrs: { name: "sortable" }
attrs: { name: "width" } # Not valid html5 but commonly used and supported.
}
# 4.9.2 The caption element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "CAPTION"
}
# 4.9.3 The colgroup element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "COLGROUP"
attrs: { name: "span" }
}
# 4.9.4 The col element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "COL"
attrs: { name: "span" }
}
# 4.9.5 The tbody element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "TBODY"
}
# 4.9.6 The thead element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "THEAD"
}
# 4.9.7 The tfoot element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "TFOOT"
}
# 4.9.8 The tr element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "TR"
# These attributes are not supported in HTML5, but are widely supported and
# commonly found.
attrs: { name: "align" }
attrs: { name: "bgcolor" }
attrs: { name: "height" }
attrs: { name: "valign" }
}
# 4.9.9 The td element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "TD"
attrs: { name: "align" } # Not valid html5 but commonly used and supported.
attrs: { name: "bgcolor" } # Not valid html5 but commonly used and supported.
attrs: { name: "colspan" }
attrs: { name: "headers" }
attrs: { name: "height" } # Not valid html5 but commonly used and supported.
attrs: { name: "rowspan" }
attrs: { name: "valign" } # Not valid html5 but commonly used and supported.
attrs: { name: "width" } # Not valid html5 but commonly used and supported.
}
# 4.9.10 The th element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "TH"
attrs: { name: "abbr" }
attrs: { name: "align" } # Not valid html5 but commonly used and supported.
attrs: { name: "bgcolor" } # Not valid html5 but commonly used and supported.
attrs: { name: "colspan" }
attrs: { name: "headers" }
attrs: { name: "height" } # Not valid html5 but commonly used and supported.
attrs: { name: "rowspan" }
attrs: { name: "scope" }
attrs: { name: "sorted" }
attrs: { name: "valign" } # Not valid html5 but commonly used and supported.
attrs: { name: "width" } # Not valid html5 but commonly used and supported.
}
# 4.10 Forms
# Form elements are allowed only when amp-form extension script is included
# with the exception of the button element which is always allowed.
# 4.10.3 The form element
tags { # <form method=GET ...>
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FORM"
spec_name: "FORM [method=GET]"
requires_extension: "amp-form"
disallowed_ancestor: "AMP-APP-BANNER"
attrs: { name: "accept" }
attrs: { name: "accept-charset" }
# For method=GET forms, we require `action` and allow `action-xhr`.
attrs: {
name: "action"
mandatory: true
value_url: {
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: {
name: "action-xhr"
value_url: {
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "autocomplete" }
attrs: {
name: "custom-validation-reporting"
value: "as-you-go"
value: "interact-and-submit"
value: "show-all-on-submit"
value: "show-first-on-submit"
}
attrs: { name: "enctype" }
attrs: {
name: "method"
# Default value is GET, so if method attribute is missing,
# it matches this tagspec.
value_casei: "get"
}
attrs: { name: "name" }
attrs: { name: "novalidate" }
attrs: {
name: "target"
mandatory: true
value_casei: "_blank"
value_casei: "_top"
}
attrs: {
name: "verify-xhr"
value_url: {
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin"
}
}
tags { # <form method=POST ...>
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "FORM"
spec_name: "FORM [method=POST]"
requires_extension: "amp-form"
disallowed_ancestor: "AMP-APP-BANNER"
attrs: { name: "accept" }
attrs: { name: "accept-charset" }
# For method=POST forms, we require `action-xhr` and disallow `action`.
attrs: {
name: "action-xhr"
mandatory: true
value_url: {
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin"
}
attrs: { name: "autocomplete" }
attrs: {
name: "custom-validation-reporting"
value: "as-you-go"
value: "interact-and-submit"
value: "show-all-on-submit"
value: "show-first-on-submit"
}
attrs: { name: "enctype" }
attrs: {
name: "method"
mandatory: true
value_casei: "post"
dispatch_key: NAME_VALUE_DISPATCH
}
attrs: { name: "name" }
attrs: { name: "novalidate" }
# This attribute has no effect, and should not be in POST forms. However,
# in the past it was required, so disallowing it would break many pages.
# See: https://github.com/ampproject/amphtml/issues/5607
attrs: {
name: "target"
value_casei: "_blank"
value_casei: "_top"
}
attrs: {
name: "verify-xhr"
value_url: {
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin"
}
}
# AMP4EMAIL allows action-xhr and disallows action attribute. It also disallows
# the use of mustache templates in action-xhr. The only allowed
# protocol for action-xhr is https. Relative urls are disallowed.
tags { # <form method=GET ...>
html_format: AMP4EMAIL
tag_name: "FORM"
spec_name: "FORM [method=GET] (AMP4EMAIL)"
requires_extension: "amp-form"
attrs: { name: "accept" }
attrs: { name: "accept-charset" }
# AMP4EMAIL only allows 'action-xhr'.
attrs: {
name: "action-xhr"
value_url: {
protocol: "https"
}
blacklisted_value_regex: "__amp_source_origin|"
"{{|}}" # Mustache is disallowed in action-xhr.
}
attrs: { name: "autocomplete" }
attrs: {
name: "custom-validation-reporting"
value: "as-you-go"
value: "interact-and-submit"
value: "show-all-on-submit"
value: "show-first-on-submit"
}
attrs: { name: "enctype" }
attrs: {
name: "method"
# Default value is GET, so if method attribute is missing,
# it matches this tagspec.
value_casei: "get"
}
attrs: { name: "name" }
attrs: { name: "novalidate" }
}
tags { # <form method=POST ...>
html_format: AMP4EMAIL
tag_name: "FORM"
spec_name: "FORM [method=POST] (AMP4EMAIL)"
requires_extension: "amp-form"
attrs: { name: "accept" }
attrs: { name: "accept-charset" }
# For method=POST forms, we require `action-xhr` and disallow `action`.
attrs: {
name: "action-xhr"
mandatory: true
value_url: {
protocol: "https"
allow_relative: false
}
blacklisted_value_regex: "__amp_source_origin|"
"{{|}}" # Mustache is disallowed in action-xhr.
}
attrs: { name: "autocomplete" }
attrs: {
name: "custom-validation-reporting"
value: "as-you-go"
value: "interact-and-submit"
value: "show-all-on-submit"
value: "show-first-on-submit"
}
attrs: { name: "enctype" }
attrs: {
name: "method"
mandatory: true
value_casei: "post"
dispatch_key: NAME_VALUE_DISPATCH
}
attrs: { name: "name" }
attrs: { name: "novalidate" }
}
# Will add verify state template if requested by users
tags {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "DIV"
spec_name: "FORM DIV [verify-error]"
mandatory_ancestor: "FORM"
attrs: { name: "align" }
attrs: {
name: "verify-error"
mandatory: true
}
}
tags {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "DIV"
spec_name: "FORM DIV [verify-error][template]"
mandatory_ancestor: "FORM"
attrs: { name: "align" }
attrs: {
name: "verify-error"
mandatory: true
}
attrs: {
name: "template"
mandatory: true
}
}
tags {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DIV"
spec_name: "FORM DIV [submitting]"
mandatory_ancestor: "FORM"
attrs: { name: "align" }
attrs: {
name: "submitting"
mandatory: true
}
}
tags {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
# AMP4EMAIL is omitted. There is additional latency in rendering A4E
# templates, which reduces the time available to render the template during
# the submitting state.
tag_name: "DIV"
spec_name: "FORM DIV [submitting][template]"
mandatory_ancestor: "FORM"
attrs: { name: "align" }
attrs: {
name: "submitting"
mandatory: true
}
attrs: {
name: "template"
mandatory: true
}
}
tags {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DIV"
spec_name: "FORM DIV [submit-success]"
mandatory_ancestor: "FORM"
attrs: { name: "align" }
attrs: {
name: "submit-success"
mandatory: true
}
}
tags {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DIV"
spec_name: "FORM DIV [submit-success][template]"
mandatory_ancestor: "FORM"
attrs: { name: "align" }
attrs: {
name: "submit-success"
mandatory: true
}
attrs: {
name: "template"
mandatory: true
}
}
tags {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DIV"
spec_name: "FORM DIV [submit-error]"
mandatory_ancestor: "FORM"
attrs: { name: "align" }
attrs: {
name: "submit-error"
mandatory: true
}
}
tags {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "DIV"
spec_name: "FORM DIV [submit-error][template]"
mandatory_ancestor: "FORM"
attrs: { name: "align" }
attrs: {
name: "submit-error"
mandatory: true
}
attrs: {
name: "template"
mandatory: true
}
}
attr_lists: {
name: "input-common-attr"
attrs: { name: "accept" }
attrs: { name: "accesskey" }
attrs: { name: "autocomplete" }
attrs: { name: "autofocus" }
attrs: { name: "checked" }
attrs: { name: "disabled" }
attrs: { name: "height" }
attrs: { name: "inputmode" }
attrs: { name: "list" }
attrs: { name: "max" }
attrs: { name: "maxlength" }
attrs: { name: "min" }
attrs: { name: "minlength" }
attrs: { name: "multiple" }
attrs: { name: "pattern" }
attrs: { name: "placeholder" }
attrs: { name: "readonly" }
attrs: { name: "required" }
attrs: { name: "selectiondirection" }
attrs: { name: "size" }
attrs: { name: "spellcheck" }
attrs: { name: "step" }
attrs: { name: "tabindex" }
attrs: { name: "value" }
attrs: { name: "width" }
# <amp-bind>
attrs: { name: "[accept]" }
attrs: { name: "[accesskey]" }
attrs: { name: "[autocomplete]" }
attrs: { name: "[checked]" }
attrs: { name: "[disabled]" }
attrs: { name: "[height]" }
attrs: { name: "[inputmode]" }
attrs: { name: "[max]" }
attrs: { name: "[maxlength]" }
attrs: { name: "[min]" }
attrs: { name: "[minlength]" }
attrs: { name: "[multiple]" }
attrs: { name: "[pattern]" }
attrs: { name: "[placeholder]" }
attrs: { name: "[readonly]" }
attrs: { name: "[required]" }
attrs: { name: "[selectiondirection]" }
attrs: { name: "[size]" }
attrs: { name: "[spellcheck]" }
attrs: { name: "[step]" }
attrs: { name: "[value]" }
attrs: { name: "[width]" }
}
attr_lists: {
name: "input-name-attr"
attrs: {
name: "name"
blacklisted_value_regex: "(^|\\s)(" # Values are space separated
"__amp_\\S*|"
"__count__|"
"__defineGetter__|"
"__defineSetter__|"
"__lookupGetter__|"
"__lookupSetter__|"
"__noSuchMethod__|"
"__parent__|"
"__proto__|"
"__AMP_\\S*|"
"\\$p|"
"\\$proxy|"
"acceptCharset|"
"addEventListener|"
"appendChild|"
"assignedSlot|"
"attachShadow|"
"baseURI|"
"checkValidity|"
"childElementCount|"
"childNodes|"
"classList|"
"className|"
"clientHeight|"
"clientLeft|"
"clientTop|"
"clientWidth|"
"compareDocumentPosition|"
"computedName|"
"computedRole|"
"contentEditable|"
"createShadowRoot|"
"enqueAction|"
"firstChild|"
"firstElementChild|"
"getAnimations|"
"getAttribute|"
"getAttributeNS|"
"getAttributeNode|"
"getAttributeNodeNS|"
"getBoundingClientRect|"
"getClientRects|"
"getDestinationInsertionPoints|"
"getElementsByClassName|"
"getElementsByTagName|"
"getElementsByTagNameNS|"
"getRootNode|"
"hasAttribute|"
"hasAttributeNS|"
"hasAttributes|"
"hasChildNodes|"
"hasPointerCapture|"
"innerHTML|"
"innerText|"
"inputMode|"
"insertAdjacentElement|"
"insertAdjacentHTML|"
"insertAdjacentText|"
"isContentEditable|"
"isDefaultNamespace|"
"isEqualNode|"
"isSameNode|"
"lastChild|"
"lastElementChild|"
"lookupNamespaceURI|"
"namespaceURI|"
"nextElementSibling|"
"nextSibling|"
"nodeName|"
"nodeType|"
"nodeValue|"
"offsetHeight|"
"offsetLeft|"
"offsetParent|"
"offsetTop|"
"offsetWidth|"
"outerHTML|"
"outerText|"
"ownerDocument|"
"parentElement|"
"parentNode|"
"previousElementSibling|"
"previousSibling|"
"querySelector|"
"querySelectorAll|"
"releasePointerCapture|"
"removeAttribute|"
"removeAttributeNS|"
"removeAttributeNode|"
"removeChild|"
"removeEventListener|"
"replaceChild|"
"reportValidity|"
"requestPointerLock|"
"scrollHeight|"
"scrollIntoView|"
"scrollIntoViewIfNeeded|"
"scrollLeft|"
"scrollWidth|"
"setAttribute|"
"setAttributeNS|"
"setAttributeNode|"
"setAttributeNodeNS|"
"setPointerCapture|"
"shadowRoot|"
"styleMap|"
"tabIndex|"
"tagName|"
"textContent|"
"toString|"
"valueOf|"
"(webkit|ms|moz|o)dropzone|"
"(webkit|moz|ms|o)MatchesSelector|"
"(webkit|moz|ms|o)RequestFullScreen|"
"(webkit|moz|ms|o)RequestFullscreen"
")(\\s|$)"
}
}
# 4.10.4 The label element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "LABEL"
attrs: { name: "for" }
spec_url: "https://www.ampproject.org/docs/reference/components/amp-form"
}
# 4.10.5 The input element.
# The input tag is also defined by extensions/amp-inputmask/validator-amp-inputmask.protoascii
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: EXPERIMENTAL
tag_name: "INPUT"
attrs: {
name: "no-verify"
value: ""
}
attrs: {
name: "type"
blacklisted_value_regex: "(^|\\s)(" # Values are space separated.
"button|"
"file|"
"image|"
"password|"
")(\\s|$)"
}
attr_lists: "input-common-attr"
attr_lists: "input-name-attr"
# Note that this amp-bind attribute is not available for the AMP4Email format
# thus we add this manually for the formats that should.
attrs: { name: "[type]" }
spec_url: "https://www.ampproject.org/docs/reference/components/amp-form"
}
tags: {
html_format: AMP
tag_name: "INPUT"
spec_name: "INPUT [type=file]"
attrs: {
name: "no-verify"
value: ""
}
attrs: {
name: "type"
value_casei: "file"
mandatory: true
dispatch_key: NAME_VALUE_DISPATCH
}
attr_lists: "input-common-attr"
attr_lists: "input-name-attr"
mandatory_ancestor: "FORM [method=POST]"
spec_url: "https://www.ampproject.org/docs/reference/components/amp-form"
}
tags: {
html_format: AMP
tag_name: "INPUT"
spec_name: "INPUT [type=password]"
attrs: {
name: "type"
value_casei: "password"
mandatory: true
dispatch_key: NAME_VALUE_DISPATCH
}
attr_lists: "input-common-attr"
attr_lists: "input-name-attr"
mandatory_ancestor: "FORM [method=POST]"
spec_url: "https://www.ampproject.org/docs/reference/components/amp-form"
}
# amp-bind usage of [type] is not allowed in AMP4EMAIL
tags: {
html_format: AMP4EMAIL
tag_name: "INPUT"
spec_name: "INPUT (AMP4EMAIL)"
attrs: {
name: "type"
blacklisted_value_regex: "(^|\\s)(" # Values are space separated.
"button|"
"file|"
"image|"
"password|"
")(\\s|$)"
}
attr_lists: "input-common-attr"
attr_lists: "input-name-attr"
spec_url: "https://www.ampproject.org/docs/reference/components/amp-form"
}
# 4.10.6 The button element
tags: {
html_format: AMP
html_format: AMP4ADS
html_format: AMP4EMAIL
html_format: EXPERIMENTAL
tag_name: "BUTTON"
attrs: {
name: "disabled"
value: ""
}
attrs: {
name: "role"
implicit: true
}
attrs: {
name: "tabindex"
implicit: true
}
attrs: { name: "type" }
attrs: { name: "value" }
# <amp-bind>
attrs: { name: "[disabled]" }
attrs: { name: "[type]" }
attrs: { name: "[value]" }
attr_lists: "input-name-attr"
}
# Button variant specifically supporting <amp-app-banner> tag with the
# open-button attribute.
tags: {
html_format: AMP
html_format: AMP4ADS
tag_name: "BUTTON"
spec_name: "amp-app-banner button[open-button]"
satisfies: "amp-app-banner button[open-button]"
mandatory_ancestor: "AMP-APP-BANNER"
attrs: {
name: "open-button"
value: ""
}
attrs: {
name: "role"
imp