This is page 18 of 20. Use http://codebase.md/cloudflare/docs/imgs/playground-ai-screenshot.png?page={x} to view the full context.
# Directory Structure
```
├── .editorconfig
├── .eslintrc.json
├── .firebaserc
├── .github
│ └── workflows
│ └── semgrep.yml
├── .gitignore
├── .travis.yml
├── assets
│ ├── extra
│ │ └── brand_assets.zip
│ ├── img
│ │ ├── about
│ │ │ ├── case-studies
│ │ │ │ └── bg_lines.png
│ │ │ ├── design-principles
│ │ │ │ ├── bg1.svg
│ │ │ │ ├── bg2.svg
│ │ │ │ ├── design_icon_break.svg
│ │ │ │ ├── design_icon_fast.svg
│ │ │ │ ├── design_icon_future.svg
│ │ │ │ ├── design_icon_layers.svg
│ │ │ │ ├── design_icon_priorities.svg
│ │ │ │ ├── design_icon_ux.svg
│ │ │ │ ├── design_icon_whitelist.svg
│ │ │ │ ├── lines1.svg
│ │ │ │ └── lines2.svg
│ │ │ ├── how-amp-works
│ │ │ │ ├── line_behind.svg
│ │ │ │ └── lines_front.svg
│ │ │ ├── overview
│ │ │ │ ├── bg2.svg
│ │ │ │ ├── herobg.svg
│ │ │ │ ├── herolines1.svg
│ │ │ │ ├── herolines2.svg
│ │ │ │ ├── line4.svg
│ │ │ │ ├── lines3.svg
│ │ │ │ ├── what_phone.png
│ │ │ │ ├── what_phone@1_5x.png
│ │ │ │ └── [email protected]
│ │ │ └── who-use-amp
│ │ │ ├── adtech
│ │ │ │ ├── adtech_icon_customize.svg
│ │ │ │ ├── adtech_icon_intro.svg
│ │ │ │ ├── adtech_icon_reach.svg
│ │ │ │ ├── adtech_icon_revenue.svg
│ │ │ │ ├── indexexchange_logo.png
│ │ │ │ ├── lines.svg
│ │ │ │ ├── sharethrough_logo.png
│ │ │ │ ├── teads_logo.svg
│ │ │ │ └── triplelift_logo.png
│ │ │ ├── advertisers
│ │ │ │ ├── advertiser_phone_wired.png
│ │ │ │ ├── advertiser_phone_wired@1_5x.png
│ │ │ │ ├── [email protected]
│ │ │ │ ├── advertisers_bg.svg
│ │ │ │ ├── advertisers_icon_audience.svg
│ │ │ │ ├── advertisers_icon_everywhere.svg
│ │ │ │ ├── advertisers_icon_intro.svg
│ │ │ │ ├── advertisers_icon_ROI.svg
│ │ │ │ └── advertisers_lines.svg
│ │ │ ├── amp-ads
│ │ │ │ ├── ads_icon.svg
│ │ │ │ ├── cloudflare_logo.png
│ │ │ │ ├── doubleclick_logo.png
│ │ │ │ ├── google_logo.png
│ │ │ │ ├── lines_bottom1.svg
│ │ │ │ ├── lines_bottom2.svg
│ │ │ │ ├── lines.svg
│ │ │ │ ├── roi_icon.svg
│ │ │ │ ├── speed_icon.svg
│ │ │ │ └── triplelift_logo.png
│ │ │ ├── card_developers.png
│ │ │ ├── card_developers.svg
│ │ │ ├── card_smb.png
│ │ │ ├── card_smb.svg
│ │ │ ├── hero_triangle.png
│ │ │ ├── publishers
│ │ │ │ ├── globo_logo.svg
│ │ │ │ ├── nyt_logo.svg
│ │ │ │ ├── publisher_icon_business.svg
│ │ │ │ ├── publisher_icon_fast.svg
│ │ │ │ ├── publisher_icon_intro.svg
│ │ │ │ ├── publisher_icon_simple.svg
│ │ │ │ ├── publisher_phone_cnn.png
│ │ │ │ ├── publisher_phone_cnn@1_5x.png
│ │ │ │ ├── [email protected]
│ │ │ │ ├── wapo_logo.png
│ │ │ │ └── wired_logo.png
│ │ │ ├── who_icon_adtech.svg
│ │ │ ├── who_icon_advertisers.svg
│ │ │ ├── who_icon_publishers.svg
│ │ │ ├── who_lines1.svg
│ │ │ ├── who_lines2.svg
│ │ │ ├── who_phones_hero.png
│ │ │ ├── who_phones_hero@1_5x.png
│ │ │ └── [email protected]
│ │ ├── amp_favicon.png
│ │ ├── amp-conf
│ │ │ └── speakers
│ │ │ ├── alex.jpg
│ │ │ ├── ali.jpg
│ │ │ ├── ardan.jpg
│ │ │ ├── beck.jpg
│ │ │ ├── bez.jpg
│ │ │ ├── chen.jpg
│ │ │ ├── dane.jpg
│ │ │ ├── eric.jpg
│ │ │ ├── gina.jpg
│ │ │ ├── honey.jpg
│ │ │ ├── jeremy.jpg
│ │ │ ├── john.jpg
│ │ │ ├── le.jpg
│ │ │ ├── madison.jpg
│ │ │ ├── malte.jpg
│ │ │ ├── malteandrudy.jpg
│ │ │ ├── mariko.jpg
│ │ │ ├── matthew.jpg
│ │ │ ├── mike.jpg
│ │ │ ├── natalia.jpg
│ │ │ ├── nicole.jpg
│ │ │ ├── paul.jpg
│ │ │ ├── ranna.jpg
│ │ │ ├── richard.jpg
│ │ │ ├── rudy.jpg
│ │ │ ├── sam.jpg
│ │ │ ├── sarah.jpg
│ │ │ ├── sebastian.jpg
│ │ │ ├── senthil.jpg
│ │ │ ├── sriram.jpg
│ │ │ ├── vadim.jpg
│ │ │ ├── vamsee.jpg
│ │ │ ├── will.jpg
│ │ │ └── yamini.jpg
│ │ ├── arrow-blue.svg
│ │ ├── arrow.svg
│ │ ├── background.jpg
│ │ ├── blog-icon.svg
│ │ ├── brand-guidelines.pdf
│ │ ├── case-studies
│ │ │ ├── gizmodo_logo.png
│ │ │ ├── gizmodo_phone1.png
│ │ │ ├── gizmodo_phone1@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── gizmodo_phone2.png
│ │ │ ├── gizmodo_phone2@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── gizmodo_thumb.jpg
│ │ │ ├── gizmodo.pdf
│ │ │ ├── hearst_framed.png
│ │ │ ├── hearst_framed2.png
│ │ │ ├── hearst_logo.png
│ │ │ ├── hearst_thumb.jpg
│ │ │ ├── hearst.pdf
│ │ │ ├── milestone_home_framed.png
│ │ │ ├── milestone_logo.png
│ │ │ ├── milestone_search_framed.png
│ │ │ ├── milestone_thumb.jpg
│ │ │ ├── milestone.pdf
│ │ │ ├── plista_graphic.png
│ │ │ ├── plista_logo.png
│ │ │ ├── plista_thumb.jpg
│ │ │ ├── plista.pdf
│ │ │ ├── relay_media_logo.png
│ │ │ ├── relay_media_thumb.jpg
│ │ │ ├── relay_media.pdf
│ │ │ ├── relaymedia_phone1.png
│ │ │ ├── relaymedia_phone1@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── relaymedia_phone2.png
│ │ │ ├── relaymedia_phone2@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── slate_logo.png
│ │ │ ├── slate_phone1.png
│ │ │ ├── slate_phone1@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── slate_phone2.png
│ │ │ ├── slate_phone2@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── slate_thumb.jpg
│ │ │ ├── slate.pdf
│ │ │ ├── teads_logo.png
│ │ │ ├── teads_logo2.png
│ │ │ ├── teads_phone.png
│ │ │ ├── teads_phone@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── teads_thumb.jpg
│ │ │ ├── teads.pdf
│ │ │ ├── terra_framed1.png
│ │ │ ├── terra_framed2.png
│ │ │ ├── terra_logo.png
│ │ │ ├── terra_thumb.jpg
│ │ │ ├── terra.pdf
│ │ │ ├── wapo_logo.png
│ │ │ ├── wapo_thumb.png
│ │ │ ├── wapo.pdf
│ │ │ ├── washingtonpost_phone.png
│ │ │ ├── washingtonpost_phone@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── wired_logo.png
│ │ │ ├── wired_phone1.png
│ │ │ ├── wired_phone1@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── wired_phone2.png
│ │ │ ├── wired_phone2@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── wired_thumb.jpg
│ │ │ └── wired.pdf
│ │ ├── cheveron-down.svg
│ │ ├── close.svg
│ │ ├── comment.png
│ │ ├── docs
│ │ │ ├── icon_important.svg
│ │ │ ├── icon_note.svg
│ │ │ ├── icon_read.svg
│ │ │ ├── icon_tip.svg
│ │ │ ├── responsive_amp_img.png
│ │ │ ├── too_much_css.png
│ │ │ ├── validator_console_imgerror.png
│ │ │ ├── validator_errors.png
│ │ │ ├── validator_extension_imgerror.png
│ │ │ ├── validator_icon_invalid.png
│ │ │ ├── validator_icon_link.png
│ │ │ ├── validator_icon_valid.png
│ │ │ ├── validator_mandatory_error.png
│ │ │ ├── validator_web_ui.png
│ │ │ └── validator_webui_imgerror.png
│ │ ├── enforce-comment.png
│ │ ├── footer
│ │ │ ├── line-left.png
│ │ │ ├── line-right-2.png
│ │ │ └── line-right.png
│ │ ├── github.png
│ │ ├── hamburger.svg
│ │ ├── home
│ │ │ ├── bg_experience.png
│ │ │ ├── home_hero_phone.png
│ │ │ ├── home_hero_phone@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── home_icon_flexibility.svg
│ │ │ ├── home_icon_performance.svg
│ │ │ ├── home_phone_ebay.png
│ │ │ ├── home_phone_ebay@1_5x.png
│ │ │ ├── [email protected]
│ │ │ ├── lines2.svg
│ │ │ ├── lines3.svg
│ │ │ ├── shapebg.svg
│ │ │ ├── teads_logo.svg
│ │ │ ├── wapo_logo.png
│ │ │ └── wired_logo.png
│ │ ├── ic_open_in_new_black.svg
│ │ ├── ic_open_in_new_white.svg
│ │ ├── icons
│ │ │ ├── 120.png
│ │ │ ├── 144.png
│ │ │ ├── 152.png
│ │ │ ├── 168.png
│ │ │ ├── 180.png
│ │ │ ├── 192.png
│ │ │ ├── 48.png
│ │ │ ├── 512.png
│ │ │ ├── 72.png
│ │ │ ├── 96.png
│ │ │ └── any.svg
│ │ ├── latest
│ │ │ ├── events
│ │ │ │ ├── event_empty.png
│ │ │ │ ├── event_empty.svg
│ │ │ │ └── event_hero.svg
│ │ │ ├── icon_audience.png
│ │ │ ├── icon_audience.svg
│ │ │ ├── icon_calendar.png
│ │ │ ├── icon_calendar.svg
│ │ │ ├── icon_location.png
│ │ │ ├── icon_location.svg
│ │ │ ├── icon_retweet.png
│ │ │ ├── icon_retweet.svg
│ │ │ ├── icon_twitter.svg
│ │ │ ├── latest_hero.jpg
│ │ │ ├── line_hero_back.svg
│ │ │ └── line_hero_front.svg
│ │ ├── liveblog-pagination.png
│ │ ├── login-button.png
│ │ ├── logo-blue.svg
│ │ ├── logout-button.png
│ │ ├── malte.jpg
│ │ ├── motions
│ │ │ └── amp-lines-motions.png
│ │ ├── nav
│ │ │ ├── back_arrow.png
│ │ │ ├── back_arrow.svg
│ │ │ ├── close.png
│ │ │ ├── close.svg
│ │ │ ├── next_level.png
│ │ │ └── next_level.svg
│ │ ├── partners
│ │ │ ├── adobe_analytics.png
│ │ │ ├── chartbeat.png
│ │ │ ├── comscore.png
│ │ │ ├── ggl_bw.png
│ │ │ ├── ggl.png
│ │ │ ├── li.png
│ │ │ ├── nuzzel.png
│ │ │ ├── parsely.png
│ │ │ ├── pinterest.png
│ │ │ ├── tw.png
│ │ │ └── wp.png
│ │ ├── platforms
│ │ │ ├── chrome.png
│ │ │ ├── criteo.png
│ │ │ ├── edge.png
│ │ │ ├── firefox.png
│ │ │ ├── google.png
│ │ │ ├── inmobi.png
│ │ │ ├── kargo.png
│ │ │ ├── mediavine.png
│ │ │ ├── opera.png
│ │ │ ├── plista.png
│ │ │ ├── safari.png
│ │ │ └── yahoo.png
│ │ ├── publishers
│ │ │ ├── abril.png
│ │ │ ├── asahi.png
│ │ │ ├── atlantic_media.png
│ │ │ ├── bbc_news.png
│ │ │ ├── buzzfeed.png
│ │ │ ├── condenast.png
│ │ │ ├── daily_mail.png
│ │ │ ├── economist.png
│ │ │ ├── editora_globo.png
│ │ │ ├── el_pais.png
│ │ │ ├── fairfax_media.png
│ │ │ ├── folha_de_s.paulo.png
│ │ │ ├── franzfurter_allgemeine.png
│ │ │ ├── ft.png
│ │ │ ├── gannett.png
│ │ │ ├── guardian.png
│ │ │ ├── hearst.png
│ │ │ ├── huffington_post.png
│ │ │ ├── la_stampa.png
│ │ │ ├── les_echos.png
│ │ │ ├── mainichi.png
│ │ │ ├── mashable.png
│ │ │ ├── mcclatchy.png
│ │ │ ├── new_york_times.png
│ │ │ ├── newscorp_australia.png
│ │ │ ├── nine_msn.png
│ │ │ ├── nrc.png
│ │ │ ├── ny_daily_news.png
│ │ │ ├── nypost.png
│ │ │ ├── pearson.png
│ │ │ ├── sankei.png
│ │ │ ├── telegraph.png
│ │ │ ├── time.png
│ │ │ ├── uol.png
│ │ │ ├── us_news.png
│ │ │ ├── vox_media.png
│ │ │ ├── wallstreetjournal.png
│ │ │ ├── washington_post.png
│ │ │ └── zeit_online.png
│ │ ├── quotes
│ │ │ ├── chartbeat.jpg
│ │ │ ├── ebay.jpg
│ │ │ ├── faz.jpg
│ │ │ ├── folha.jpg
│ │ │ ├── google.jpg
│ │ │ ├── guardian.jpg
│ │ │ ├── hearst.jpg
│ │ │ ├── lastampa.jpg
│ │ │ ├── newyorktimes.jpeg
│ │ │ ├── twitter.jpg
│ │ │ └── vox.jpg
│ │ ├── return-parameter.png
│ │ ├── sprite.svg
│ │ ├── symbols
│ │ │ ├── carat-down.svg
│ │ │ ├── carat.svg
│ │ │ ├── caret-right.svg
│ │ │ ├── close.svg
│ │ │ ├── lang-icon.svg
│ │ │ ├── logo-blue-standalone.svg
│ │ │ ├── return.svg
│ │ │ ├── search.svg
│ │ │ ├── share-close.svg
│ │ │ ├── share.svg
│ │ │ ├── template.scss
│ │ │ ├── twitter.svg
│ │ │ ├── video-play.svg
│ │ │ └── wordpress.svg
│ │ └── twitter.png
│ ├── manifest.json
│ ├── sass
│ │ ├── _accordions.scss
│ │ ├── _animated_lines.scss
│ │ ├── _animations.scss
│ │ ├── _bg-triangle.scss
│ │ ├── _callouts.scss
│ │ ├── _cards.scss
│ │ ├── _carousel.scss
│ │ ├── _config.scss
│ │ ├── _content-post.scss
│ │ ├── _content-section.scss
│ │ ├── _content.scss
│ │ ├── _doc-nav.scss
│ │ ├── _footer.scss
│ │ ├── _global.scss
│ │ ├── _grid.scss
│ │ ├── _header.scss
│ │ ├── _inline-toc.scss
│ │ ├── _lang_switcher.scss
│ │ ├── _large-cta.scss
│ │ ├── _lightbox.scss
│ │ ├── _mixins.scss
│ │ ├── _nav.scss
│ │ ├── _points.scss
│ │ ├── _post-item.scss
│ │ ├── _responsive.scss
│ │ ├── _search.scss
│ │ ├── _share.scss
│ │ ├── _sidebar.scss
│ │ ├── _sprite_generated.scss
│ │ ├── _sprite.scss
│ │ ├── _syntax_highlighting.scss
│ │ ├── _tables.scss
│ │ ├── _toc.scss
│ │ ├── about-how.min.scss
│ │ ├── about-overview.min.scss
│ │ ├── about-who-vertical.min.scss
│ │ ├── about-who.min.scss
│ │ ├── blog.min.scss
│ │ ├── case-study.min.scss
│ │ ├── design-principles.min.scss
│ │ ├── docs.min.scss
│ │ ├── home.min.scss
│ │ ├── list.min.scss
│ │ ├── main.min.scss
│ │ ├── pages
│ │ │ ├── _about-how.scss
│ │ │ ├── _about-overview.scss
│ │ │ ├── _about-who-vertical.scss
│ │ │ ├── _about-who.scss
│ │ │ ├── _case-study.scss
│ │ │ ├── _design-principles.scss
│ │ │ ├── _events.scss
│ │ │ ├── _faqs.scss
│ │ │ ├── _home.scss
│ │ │ ├── _latest.scss
│ │ │ ├── _list.scss
│ │ │ ├── _post-detail.scss
│ │ │ ├── _roadmap.scss
│ │ │ ├── _who.scss
│ │ │ └── amp-conf.scss
│ │ └── section.min.scss
│ └── video
│ ├── amp-phone.mp4
│ └── amp-phone.webm
├── content
│ ├── contribute
│ │ └── governance.md
│ ├── docs
│ │ ├── _blueprint.yaml
│ │ ├── blank.html
│ │ ├── build.md
│ │ ├── contribute
│ │ │ ├── _blueprint.yaml
│ │ │ ├── contribute.md
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── file-a-bug.md
│ │ │ └── github.md
│ │ ├── contribute.md
│ │ ├── get_started
│ │ │ ├── _blueprint.yaml
│ │ │ ├── create
│ │ │ │ ├── _blueprint.yaml
│ │ │ │ ├── basic_markup.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── basic_markup@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── basic_markup@zh_CN.md
│ │ │ │ ├── include_image.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── include_image@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── include_image@zh_CN.md
│ │ │ │ ├── prepare_for_discovery.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── prepare_for_discovery@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── prepare_for_discovery@zh_CN.md
│ │ │ │ ├── presentation_layout.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── presentation_layout@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── presentation_layout@zh_CN.md
│ │ │ │ ├── preview_and_validate.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── preview_and_validate@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── preview_and_validate@zh_CN.md
│ │ │ │ ├── publish.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── publish@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └── publish@zh_CN.md
│ │ │ ├── create.md
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── create@pt_BR.md
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── create@zh_CN.md
│ │ │ ├── live_blog.md
│ │ │ ├── [email protected]
│ │ │ ├── login_requiring
│ │ │ │ ├── _blueprint.yaml
│ │ │ │ ├── add_comment.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── login.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── logout.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── summary.md
│ │ │ │ └── [email protected]
│ │ │ ├── login_requiring.md
│ │ │ └── [email protected]
│ │ ├── getting-started.md
│ │ ├── guides
│ │ │ ├── _blueprint.yaml
│ │ │ ├── author_develop
│ │ │ │ ├── _blueprint.yaml
│ │ │ │ ├── ads_on_amp
│ │ │ │ │ ├── _blueprint.yaml
│ │ │ │ │ ├── ads_getting_started.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── ads_tips.md
│ │ │ │ │ └── [email protected]
│ │ │ │ ├── ads_on_amp.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── amp_replacements.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── iframes.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── responsive_amp
│ │ │ │ │ ├── _blueprint.yaml
│ │ │ │ │ ├── art_direction.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── control_layout.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── control_layout@pt_BR.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── control_layout@zh_CN.md
│ │ │ │ │ ├── custom_fonts.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── placeholders.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── style_pages.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── style_pages@pt_BR.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ └── style_pages@zh_CN.md
│ │ │ │ ├── responsive_amp.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── responsive_amp@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── responsive_amp@zh_CN.md
│ │ │ │ ├── third_party_components.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── third_party_components@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └── third_party_components@zh_CN.md
│ │ │ ├── author_develop.md
│ │ │ ├── debug
│ │ │ │ ├── _blueprint.yaml
│ │ │ │ ├── validate.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── validate@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ └── validate@zh_CN.md
│ │ │ ├── debug.md
│ │ │ ├── deploy
│ │ │ │ ├── _blueprint.yaml
│ │ │ │ ├── analytics_amp
│ │ │ │ │ ├── _blueprint.yaml
│ │ │ │ │ ├── analytics_basics.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── analytics_basics@pt_BR.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── analytics_basics@zh_CN.md
│ │ │ │ │ ├── deep_dive_analytics.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── deep_dive_analytics@pt_BR.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── deep_dive_analytics@zh_CN.md
│ │ │ │ │ ├── use_cases.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── use_cases@pt_BR.md
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ └── use_cases@zh_CN.md
│ │ │ │ ├── analytics_amp.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── analytics_amp@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── analytics_amp@zh_CN.md
│ │ │ │ ├── discovery.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── discovery@pt_BR.md
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── [email protected]
│ │ │ │ ├── discovery@zh_CN.md
│ │ │ │ ├── engagement.md
│ │ │ │ └── [email protected]
│ │ │ ├── deploy.md
│ │ │ └── embed
│ │ │ ├── _blueprint.yaml
│ │ │ └── login-paywalls.md
│ │ ├── guides.md
│ │ ├── reference
│ │ │ ├── _blueprint.yaml
│ │ │ ├── common_attributes.md
│ │ │ ├── components
│ │ │ │ ├── _blueprint.yaml
│ │ │ │ ├── ads-analytics
│ │ │ │ │ └── _blueprint.yaml
│ │ │ │ ├── dynamic-content
│ │ │ │ │ └── _blueprint.yaml
│ │ │ │ ├── layout
│ │ │ │ │ └── _blueprint.yaml
│ │ │ │ ├── media
│ │ │ │ │ └── _blueprint.yaml
│ │ │ │ ├── presentation
│ │ │ │ │ └── _blueprint.yaml
│ │ │ │ └── social
│ │ │ │ └── _blueprint.yaml
│ │ │ ├── components.md
│ │ │ ├── experimental.md
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── experimental@pt_BR.md
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── experimental@zh_CN.md
│ │ │ ├── validation_errors.md
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── validation_errors@pt_BR.md
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── validation_errors@zh_CN.md
│ │ ├── reference.md
│ │ └── tutorials.md
│ ├── includes
│ │ ├── _blueprint.yaml
│ │ ├── amp-conf-2017.yaml
│ │ ├── amp-iframe.md
│ │ ├── blog_feed.yaml
│ │ ├── doc.yaml
│ │ ├── events.yaml
│ │ ├── home.yaml
│ │ ├── html-example.md
│ │ ├── latest.yaml
│ │ ├── list-blog.yaml
│ │ ├── lists.yaml
│ │ ├── menu.yaml
│ │ ├── roadmap.yaml
│ │ └── tweets.yaml
│ ├── latest
│ │ ├── _blueprint.yaml
│ │ ├── blog
│ │ │ ├── _blueprint.yaml
│ │ │ ├── 1056.md
│ │ │ ├── ads-on-the-web-will-get-better-with-amp-heres-how.md
│ │ │ ├── amp-roadmap-update-for-mid-q1-2017.md
│ │ │ ├── amp-up-for-amp-conf-2017.md
│ │ │ ├── grow-your-business-with-ads-on-amp.md
│ │ │ ├── new-default-placeholders-for-ads-in-amp.md
│ │ │ ├── new-industry-benchmarks-for-mobile-page-speed.md
│ │ │ ├── speeding-up-news-apps-with-amp.md
│ │ │ ├── whats-in-an-amp-url.md
│ │ │ └── why-amp-caches-exist.md
│ │ ├── latest.html
│ │ ├── list-blog.html
│ │ ├── list-event.html
│ │ ├── list-past-event.html
│ │ └── roadmap.html
│ ├── learn
│ │ ├── _blueprint.yaml
│ │ ├── about-amp.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── about-amp@pt_BR.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── about-amp@zh_CN.md
│ │ ├── about-how.yaml
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── about-how@pt_BR.yaml
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── about-how@zh_CN.yaml
│ │ ├── amp-design-principles.yaml
│ │ ├── browsers.md
│ │ ├── case-studies
│ │ │ ├── _blueprint.yaml
│ │ │ ├── category
│ │ │ │ ├── _blueprint.yaml
│ │ │ │ ├── advertisers.md
│ │ │ │ └── publishers.md
│ │ │ ├── gizmodo.md
│ │ │ ├── hearst.md
│ │ │ ├── milestone.md
│ │ │ ├── plista.md
│ │ │ ├── relay_media.md
│ │ │ ├── slate.md
│ │ │ ├── teads.md
│ │ │ ├── terra.md
│ │ │ ├── washingtonpost.md
│ │ │ └── wired.md
│ │ ├── case-studies.html
│ │ ├── how-amp-works.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── how-amp-works@pt_BR.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── how-amp-works@zh_CN.md
│ │ ├── metrics.html
│ │ ├── overview.yaml
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── overview@pt_BR.yaml
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── overview@zh_CN.yaml
│ │ ├── who
│ │ │ ├── _blueprint.yaml
│ │ │ ├── ad-tech-platforms.yaml
│ │ │ ├── advertisers.yaml
│ │ │ ├── amp-ads.yaml
│ │ │ └── publishers.yaml
│ │ └── who-uses-amp.yaml
│ ├── pages
│ │ ├── _blueprint.yaml
│ │ ├── amp-conf-2017
│ │ │ ├── _blueprint.yaml
│ │ │ ├── accessibility.html
│ │ │ └── code-of-conduct.html
│ │ ├── amp-conf-2017.html
│ │ ├── home.html
│ │ ├── how-it-works.html
│ │ └── metrics_chart.html
│ └── support
│ ├── _blueprint.yaml
│ ├── developer
│ │ ├── _blueprint.yaml
│ │ ├── documentation-bug.md
│ │ ├── mailing-list.md
│ │ ├── platform-bug.md
│ │ ├── slack.md
│ │ └── stack-overflow.md
│ ├── developer.md
│ ├── faqs
│ │ ├── _blueprint.yaml
│ │ ├── overview.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── overview@pt_BR.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── overview@zh_CN.md
│ │ ├── platform-involvement.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── platform-involvement@pt_BR.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── platform-involvement@zh_CN.md
│ │ ├── publisher-monetization.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── publisher-monetization@pt_BR.md
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── publisher-monetization@zh_CN.md
│ │ └── supported-platforms.md
│ ├── faqs.md
│ ├── platform.md
│ ├── support.md
│ ├── vendor
│ │ ├── _blueprint.yaml
│ │ └── amp-certification.md
│ └── vendor.md
├── CONTRIBUTING.md
├── firebase.json
├── gulpfile.js
├── LICENSE
├── npm-shrinkwrap.json
├── package.json
├── podspec.yaml
├── pwa
│ ├── google7199ce9da1ad191b.html
│ ├── pwa.html
│ ├── pwa.js
│ └── service-worker.js
├── README.md
├── scripts
│ ├── component_categories.json
│ ├── import_docs.js
│ ├── import_docs.json
│ ├── update_blog_links.js
│ ├── update_platforms_page.js
│ └── update_tweets.js
├── translations
│ ├── ar
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── de
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── es
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── fr
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── id
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── it
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── ja
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── ko
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── messages.pot
│ ├── pl
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── pt_BR
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── ru
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── th
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ ├── tr
│ │ └── LC_MESSAGES
│ │ └── messages.po
│ └── zh_CN
│ └── LC_MESSAGES
│ └── messages.po
└── views
├── about-casestudies.html
├── about-how.html
├── about-overview.html
├── about-who-vertical.html
├── about-who.html
├── base.html
├── blank.html
├── blog_detail.html
├── case-study.html
├── design-principles.html
├── doc.html
├── grid_page.html
├── list_page.html
├── partials
│ ├── breadcrumb-nav.html
│ ├── doc_nav.html
│ ├── faq-accordion.html
│ ├── footer-cta.html
│ ├── footer.html
│ ├── grid-card.html
│ ├── head.html
│ ├── header.html
│ ├── lang_switcher.html
│ ├── large-cta.html
│ ├── lines.html
│ ├── nav.html
│ ├── points.html
│ ├── post-item.html
│ ├── promo_banner.html
│ ├── search.html
│ ├── share.html
│ ├── sidebar.html
│ └── sub_nav.html
└── section_page.html
```
# Files
--------------------------------------------------------------------------------
/content/docs/reference/[email protected]:
--------------------------------------------------------------------------------
```markdown
---
$title: Errori di convalida AMP
---
<!---
Copyright 2015 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.
-->
I documenti AMP validi non devono contenere errori di convalida.
Questo documento ha lo scopo di aiutarti a comprendere meglio e a correggere gli eventuali errori riscontrati durante la [convalida delle tue pagine AMP](/docs/guides/validate.html).
Per una panoramica completa degli errori di convalida, leggi la [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
[TOC]
## Errori negli attributi e nei tag HTML AMP
### Tag obbligatorio mancante
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MANDATORY_TAG_MISSING</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The mandatory tag '%1' is missing or incorrect."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Aggiungi (o correggi) il tag HTML obbligatorio.</td>
</tr>
</table>
I tag che seguono devono essere presenti in tutti i documenti AMP:
* <a name="doctype"></a>`<!doctype html>`
* <a name="html"></a>`<html amp> or <html ⚡>`
* <a name="head"></a>`<head>`
* <a name="canonical"></a>`<link rel="canonical" href="$SOME_URL" />`
* <a name="utf"></a>`<meta charset="utf-8">`
* <a name="viewport"></a>`<meta name="viewport" content="...">`
* <a name="boilerplate"></a>`<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>`
* <a name="ampscript"></a>`<script async src="https://cdn.ampproject.org/v0.js"></script>`
* <a name="body"></a>`<body>`
Questi tag obbligatori includono un campo `mandatory: true` nella [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii); vengono inoltre citati nella [specifica AMP](/docs/reference/spec.html).
### Tag richiesto da un altro tag mancante
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>TAG_REQUIRED_BY_MISSING</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The '%1' tag is missing or incorrect, but required by '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Aggiungi (o correggi) il tag HTML richiesto.</td>
</tr>
</table>
Lo strumento di convalida genera l'errore `TAG_REQUIRED_BY_MISSING` quando trova un componente esteso nel documento AMP, ma non trova il relativo equivalente `<script>`.
I [componenti estesi](/docs/reference/extended.html) devono essere inclusi esplicitamente nel documento AMP sotto forma di elementi personalizzati.
Per correggere questi errori visita la pagina di riferimento del componente esteso, copia lo script obbligatorio e incollalo nell'elemento `<head>` del documento AMP.
### Tag non consentito
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>DISALLOWED_TAG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The tag '%1' is disallowed."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi il tag non consentito.</td>
</tr>
</table>
Esiste una whitelist dei tag, ma non esiste un elenco definitivo di tutti i tag non consentiti; tuttavia, la [specifica AMP](/docs/reference/spec.html) definisce un insieme approssimativo dei tag non consentiti.
### Attributo obbligatorio mancante
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MANDATORY_ATTR_MISSING</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The mandatory attribute '%1' is missing in tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Aggiungi l'attributo obbligatorio al tag.</td>
</tr>
</table>
Gli attributi obbligatori dei tag AMP sono definiti all'interno della [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Cerca il tag, visualizza gli attributi elencati e controlla se è presente `mandatory: true`.
Gli attributi obbligatori di ogni tag AMP sono elencati anche nella specifica del tag.
### Valore dell'attributo non valido
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>INVALID_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The attribute '%1' in tag '%2' is set to the invalid value '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Correggi il valore dell'attributo inpostandone uno valido.</td>
</tr>
</table>
Questo errore indica che un tag HTML ha un attributo con un nome consentito, ma non un valore consentito.
Ad esempio, spesso questo errore viene generato se vengono rilevati valori non validi negli URL. Tutti i valori degli URL (negli attributi `href` e `src`) devono corrispondere a uno di questi [valori possibili degli attributi](http://www.w3schools.com/tags/att_a_href.asp).
<strong>IMPORTANTE.</strong> Molti valori degli URL nello standard AMP richiedono il protocollo HTTPS. Se ricevi questo errore, ma non sai esattamente perché, controlla la specifica del tag AMP pertinente per verificare se l'attributo richiede HTTPS.
### Attributo non consentito
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>DISALLOWED_ATTR</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The attribute '%1' may not appear in tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi l'attributo dal tag HTML.</td>
</tr>
</table>
Esiste una whitelist degli attributi, ma non esiste un elenco definitivo di tutti gli attributi non consentiti.
Per controllare gli attributi supportati per ogni tag specifico, cerca il tag HTML, quindi il valore `attrs` nella [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Oltre agli attributi specifici di ogni tag presenti in una whitelist, tutti i tag AMP possono utilizzare qualsiasi attributo presente nella whitelist `$GLOBAL_ATTRS`; è possibile utilizzare anche tutti gli attributi con il prefisso `"data-"`.
### Testo obbligatorio mancante o errato
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MANDATORY_CDATA_MISSING_OR_INCORRECT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The mandatory text (CDATA) inside tag '%1' is missing or incorrect."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Aggiungi o correggi il testo obbligatorio all'interno del tag.</td>
</tr>
</table>
Gli elementi CDATA sono i dati sui contenuti racchiusi tra tag HTML di inizio e di fine; attualmente vengono valutati utilizzando sia whitelist sia blacklist.
I tag con elementi CDATA obbligatori includono:
[sourcecode:html]
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
[/sourcecode]
E:
[sourcecode:html]
<style amp-custom>
[/sourcecode]
I messaggi dettagliati relativi a questo errore possono essere i seguenti:
* "Boilerplate stili obbligatorio (js attivo)"
* "Boilerplate stili obbligatorio (noscript)"
* "Prefisso nome classe CSS -amp- non consentito"
* "Attributo !important non consentito in CSS"
* "Regola @charset non consentita in CSS"
* "Regola @import non consentita in CSS"
* "Regola @namespace non consentita in CSS"
* "Regola @supports non consentita in CSS"
* "Regola @document non consentita in CSS"
* "Regola @page non consentita in CSS"
* "Regola @viewport non consentita in CSS"
### Testo non consentito all'interno del tag
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>CDATA_VIOLATES_BLACKLIST</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The text (CDATA) inside tag '%1' matches '%2', which is disallowed."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi il testo non consentito.</td>
</tr>
</table>
Alcuni dati CSS specifici sono stati inseriti in una blacklist per convalidare le regole AMP CSS essenziali.
Di seguito è riportato l'elenco di dati CSS inseriti nella blacklist (vedi anche <a href="https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii">`blacklisted_cdata_regex` nella specifica dello strumento di convalida AMP</a>):
* `"\\.i?-amp-"` ("prefisso nome classe CSS -amp-")
* `"!important"`
* `"charset"`
* `"@import"`
* `"@namespace"`
* `"@document"`
* `"@page"`
* `"@viewport"`
### Proprietà non consentita all'interno dell'attributo del tag
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>DISALLOWED_PROPERTY_IN_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The property '%1' in attribute '%2' in tag '%3' is disallowed."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi la proprietà non consentita dall'attributo specificato.</td>
</tr>
</table>
Questo errore si verifica quando il nome della proprietà all'interno di un attributo non è consentito.
In questo contesto, con il termine proprietà si indicano i dati strutturati chiave/valore all'interno di un attributo.
Ad esempio, in `<meta name="viewport content="width=device-width;minimum-scale=1">`, `width` e `minimum-scale` sono nomi di proprietà.
Il codice seguente genera un errore DISALLOWED_PROPERTY_IN_ATTR_VALUE:
`<meta name="viewport content="width=device-width;invalidfoo=1">`
Ecco un altro esempio di codice che genererebbe un errore:
`<meta http-equiv="X-UA-Compatible" content="invalidfoo=edge">`
Dovrebbe essere: `<meta http-equiv="X-UA-Compatible" content="ie=edge">`.
### Valore della proprietà non valido
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>INVALID_PROPERTY_VALUE_IN_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The property '%1' in attribute '%2' in tag '%3' is set to '%4', which is invalid."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Correggi il valore non valido della proprietà.</td>
</tr>
</table>
Questo errore si verifica quando il valore della proprietà all'interno di un attributo non è valido.
In questo contesto, con il termine proprietà si indicano i dati strutturati chiave/valore all'interno di un attributo.
Ad esempio, in `<meta name="viewport content="width=device-width;minimum-scale=1">`, `device-width` e `1` sono valori di proprietà.
Il codice seguente genera un errore INVALID_PROPERTY_VALUE_IN_ATTR_VALUE:
`<meta name=viewport content="width=device-width;minimum-scale=invalidfoo">`
Ecco un altro esempio di codice che genererebbe un errore:
`<meta http-equiv="X-UA-Compatible" content="ie=invalidfoo">`
Dovrebbe essere: `<meta http-equiv="X-UA-Compatible" content="ie=edge">`
### URL mancante
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MISSING_URL</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"Missing URL for attribute '%1' in tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Aggiungi l'URL valido.</td>
</tr>
</table>
Questo errore si verifica quando manca un URL in un attributo che lo richiede, ad esempio se viene rilevato un attributo `href` o `src` vuoto.
### URL non valido
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>INVALID_URL_PROTOCOL</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"Malformed URL '%3' for attribute '%1' in tag '%2'"</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Correggi l'URL inaccessibile.</td>
</tr>
</table>
Questo errore si verifica quando un attributo contiene un URL non valido.
### Protocollo dell'URL non valido
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>INVALID_URL_PROTOCOL</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>Invalid URL protocol '%3:' for attribute '%1' in tag '%2'.</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Sostituiscilo con un protocollo valido, ad esempio `http` potrebbe dover essere `https`.</td>
</tr>
</table>
Questo errore si verifica quando i tag con attributi `href` o `src` devono essere impostati con determinati protocolli.
Ad esempio, molti tag richiedono `https`.
### Proprietà obbligatoria mancante nell'attributo
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MANDATORY_PROPERTY_MISSING_FROM_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The property '%1' is missing from attribute '%2' in tag '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Aggiungi la proprietà mancante.</td>
</tr>
</table>
Attualmente questo errore si verifica se mancano le seguenti proprietà obbligatorie:
* `content="...ie=..."`
* `content="...width=..."`
* `content="...minimum-scale=..."`
Si riferiscono ai tag previsti:
* `<meta http-equiv="X-UA-Compatible" content="ie=edge">`
* `<meta name=viewport content="width=device-width;minimum-scale=1">`
### Attributi che si escludono a vicenda
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MUTUALLY_EXCLUSIVE_ATTRS</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"Mutually exclusive attributes encountered in tag '%1' - pick one of %2."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi uno degli attributi che si escludono a vicenda.</td>
</tr>
</table>
Questo errore si verifica quando un tag ha entrambi gli attributi che si escludono a vicenda.
Ad esempio, è consentito un solo tag tra i seguenti:
* [amp-twitter](/docs/reference/extended/amp-twitter.html): `data-tweetid` o `src`
* [amp-instagram](/docs/reference/extended/amp-instagram.html): `data-shortcode` o `src`
* [amp-iframe](/docs/reference/extended/amp-iframe.html): `src` o `srcdoc`
* [amp-youtube](/docs/reference/extended/amp-youtube.html): `src` o `data-videoid`
### Attributo obbligatorio mancante tra quelli dell'elenco
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MANDATORY_ONEOF_ATTR_MISSING</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The tag '%1' is missing a mandatory attribute - pick one of %2." </td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Aggiungi l'attributo obbligatorio mancante scelto dalla serie di attributi forniti.</td>
</tr>
</table>
Questo errore si verifica quando in un tag manca un attributo obbligatorio a scelta tra quelli forniti.
Ad esempio, i seguenti tag richiedono uno dei due attributi possibili:
* [amp-twitter](/docs/reference/extended/amp-twitter.html): `data-tweetid` o `src`
* [amp-instagram](/docs/reference/extended/amp-instagram.html): `data-shortcode` o `src`
* [amp-iframe](/docs/reference/extended/amp-iframe.html): `src` o `srcdoc`
* [amp-youtube](/docs/reference/extended/amp-youtube.html): `src` o `data-videoid`
### Tag principale errato
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>WRONG_PARENT_TAG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The parent tag of tag '%1' is '%2', but it can only be '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Imposta il tag come tag secondario diretto del tag principale obbligatorio.</td>
</tr>
</table>
Alcuni tag specifici richiedono un tag principale diretto (anziché un lontano predecessore).
Di seguito è elencato il tag principale richiesto per tag specifici (tag, principale):
* `!doctype` richiede il tag principale `root`.
* `html` richiede il tag principale `!doctype`.
* `head` richiede il tag principale `html`.
* `body` richiede il tag principale `html`.
* `link` richiede il tag principale `head`.
* `meta` richiede il tag principale `head`.
* `style amp-custom` richiede il tag principale `head`.
* `style` richiede il tag principale `boilerplate (noscript)`.
* `noscript` richiede il tag principale `head`.
* `script` richiede il tag principale `head`.
* `source` richiede un tag multimediale (`amp-audio`, `amp-video` e così via).
### Predecessore del tag non consentito
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>DISALLOWED_TAG_ANCESTOR</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The tag '%1' may not appear as a descendant of tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi (o sposta) il tag nidificato non consentito.</td>
</tr>
</table>
Questo errore si verifica quando un tag è un discendente di un altro tag che non viene convalidato.
Attualmente l'unico esempio è il tag `template`, che non può essere nidificato in un altro tag `template`.
### Predecessore del tag obbligatorio
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MANDATORY_TAG_ANCESTOR</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The tag '%1' may only appear as a descendant of tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi il tag o impostalo come discendente del tag specifico.</td>
</tr>
</table>
I discendenti obbligatori sono definiti come `mandatory_ancestor` nella [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Questo errore si verifica quando manca `mandatory_ancestor` (tag, predecessore) nei seguenti tag:
* `img` deve essere un discendente di `noscript`.
* `video` deve essere un discendente di `noscript`.
* `audio` deve essere un discendente di `noscript`.
* `noscript` deve essere un discendente di `body`.
### Predecessore del tag obbligatorio con suggerimento
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>MANDATORY_TAG_ANCESTOR_WITH_HINT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The tag '%1' may only appear as a descendant of tag '%2'. Did you mean '%3'?"</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi il tag, impostalo come discendente del tag specifico o sostituisci il tag con il tag suggerito.</td>
</tr>
</table>
Questo errore si verifica quando nel documento AMP viene trovato uno dei seguenti tag non nidificato correttamente nel relativo tag principale obbligatorio:
* `img` non si trova all'interno del tag principale `noscript`.
* `video` non si trova all'interno del tag principale `noscript`.
* `audio` non si trova all'interno del tag principale `noscript`.
* `noscript` non si trova all'interno del tag principale `body`.
### Tag univoco duplicato
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>DUPLICATE_UNIQUE_TAG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The tag '%1' appears more than once in the document."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi uno dei tag duplicati dal documento AMP.</td>
</tr>
</table>
Questo errore si verifica quando è consentita una sola istanza del tag e viene trovato un duplicato.
L'elenco completo di tag univoci è noto ed è riportato di seguito:
* `<doctype html>`
* `<html amp>`
* `<head>`
* `<link rel=canonical href=...>`
* `<link rel=amphtml href=...>`
* `<meta charset="utf-8">`
* `<meta viewport>`
* `<style amp-custom>`
* `<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>`
* `<body>`
* `<script src="https://cdn.ampproject.org/v0.js">`
## Errori di stile e layout
Prima di approfondire gli errori di stile e layout, è opportuno capire come funzionano [l'applicazione di stili](/docs/guides/responsive/style_pages.html) e il [layout](/docs/guides/responsive/control_layout.html) in AMP. Poiché le pagine AMP sono pagine HTML, l'applicazione di stili è molto simile a quella delle pagine HTML.
Esistono però alcune limitazioni per garantire il rapido caricamento delle pagine; tali limitazioni vengono applicate dallo strumento di convalida AMP.
Il layout è più contenuto nelle pagine AMP.
Ogni tag che viene visualizzato nella pagina richiede altezza e larghezza predefinite, riducendo notevolmente blocchi del rendering e dello scorrimento.
Questo non significa che tu debba includere manualmente questi attributi.
Per alcuni tipi di layout, lo strumento di convalida AMP non genera errori perché i valori predefiniti vengono dedotti.
Ogni tag AMP ha un elenco di attributi `supported_layouts`, come definito nella [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Lo strumento di convalida genera errori per i layout non supportati e cerca il layout predefinito nelle regole di convalida.
### Foglio di stile troppo lungo
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>STYLESHEET_TOO_LONG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The author stylesheet specified in tag 'style' is too long - we saw %1 bytes whereas the limit is %2 bytes."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Riduci le dimensioni del foglio di stile in modo che siano inferiori a 50.000 byte.</td>
</tr>
</table>
Lo strumento di convalida AMP genera questo errore quando stabilisce che le dimensioni dei contenuti degli stili all'interno di `<style amp-custom>` superano il limite di 50.000 byte.
### Errore di sintassi CSS
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>CSS_SYNTAX</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"CSS syntax error in tag '%1' - %2."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Correggi l'errore di sintassi CSS.</td>
</tr>
</table>
Questo errore si verifica quando sono presenti errori di sintassi CSS nel tag specificato.
Se hai dubbi in merito alla causa dell'errore, prova a eseguire CSS tramite uno strumento di convalida CSS online, ad esempio [csslint](http://csslint.net/).
### Errore di sintassi CSS nella regola specifica
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>CSS_SYNTAX_INVALID_AT_RULE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"CSS syntax error in tag '%1' - saw invalid at rule '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Correggi l'errore di sintassi CSS specificato.</td>
</tr>
</table>
Questo errore si riferisce alle regole at-rule in CSS, per cui AMP consente soltanto alcune regole (vedi anche la [specifica AMP](/docs/reference/spec.html)).
Ad esempio, la regola `@import` non è consentita.
L'errore di convalida ti indica la regola esatta non valida, facilitandoti così la correzione.
### Layout implicito non supportato dal tag AMP
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>IMPLIED_LAYOUT_INVALID</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The implied layout '%1' is not supported by tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Specifica un attributo layout valido per il tag.</td>
</tr>
</table>
Questo errore si verifica quando non specifichi un layout per il tag AMP e il layout implicito (basato su larghezza, altezza e dimensioni) non è supportato.
Controlla i valori `supported_layout` del tag nella [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
L'effettivo comportamento del layout viene stabilito dall'attributo `layout`.
Per ulteriori informazioni sul funzionamento del layout, leggi la pagina relativa a [come controllare il layout](/docs/guides/responsive/control_layout.html) e la [specifica relativa al sistema di layout HTML AMP](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
**Nota.** Se non specifichi il layout e non includi i valori `width` e `height`, il valore predefinito per il layout sarà CONTAINER. Lo strumento di convalida genera un errore perché il layout CONTAINER non è supportato nei tag AMP.
Specifica un layout diverso da CONTAINER oppure aggiungi un valore `width` e/o `height` per eliminare l'errore.
### Attributo non consentito per il layout implicito
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>ATTR_DISALLOWED_BY_IMPLIED_LAYOUT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The attribute '%1' in tag '%2' is disallowed by implied layout '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi l'attributo non consentito dal tag oppure specifica un layout in cui tale attributo sia consentito.</td>
</tr>
</table>
Questo errore si verifica quando non specifichi un layout per il tag AMP e il layout implicito contiene un attributo non consentito.
Gli attributi non consentiti per i tipi di layout sono descritti nella [specifica relativa al sistema di layout HTML AMP](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### Layout specificato non supportato dal tag AMP
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>SPECIFIED_LAYOUT_INVALID</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The specified layout '%1' is not supported by tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Specifica un layout che sia supportato dal tag.</td>
</tr>
</table>
Questo errore si verifica quando il layout specificato per il tag non è supportato.
Controlla i valori `supported_layout` del tag nella [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
L'effettivo comportamento del layout viene stabilito dall'attributo `layout`.
Per ulteriori informazioni sul funzionamento del layout, leggi la pagina relativa a [come controllare il layout](/docs/guides/responsive/control_layout.html) e la [specifica relativa al sistema di layout HTML AMP](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### Attributo non consentito per il layout specificato
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>ATTR_DISALLOWED_BY_SPECIFIED_LAYOUT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The attribute '%1' in tag '%2' is disallowed by implied layout '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi l'attributo non consentito dal tag oppure specifica un layout in cui tale attributo sia consentito.</td>
</tr>
</table>
Questo errore si verifica quando specifichi per il tag AMP un layout contenente un attributo non consentito.
Gli attributi non consentiti per i tipi di layout sono descritti nella [specifica relativa al sistema di layout HTML AMP](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### Valore non valido per l'attributo richiesto dal layout
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>ATTR_VALUE_REQUIRED_BY_LAYOUT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"Invalid value '%1' for attribute '%2' in tag '%3' - for layout '%4', set the attribute '%2' to value '%5'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Imposta il valore specificato per l'attributo.</td>
</tr>
</table>
Questo errore si verifica quando il valore dell'attributo non è valido per il layout specificato.
Per comprendere la causa di questo errore, è necessario comprendere bene i [diversi comportamenti dei layout](/docs/guides/responsive/control_layout.html#size-and-position-elements).
Supponi di impostare il layout `fixed-height` e di includere valori numerici per entrambi gli attributi `height` e `width`.
Il valore del layout `fixed-height` è `height`.
L'attributo `width` non deve essere presente o deve essere impostato su `auto`.
Lo strumento di convalida genera l'errore ATTR_VALUE_REQUIRED_BY_LAYOUT.
### Unità di misura relative alla larghezza e all'altezza disomogenee
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>INCONSISTENT_UNITS_FOR_WIDTH_AND_HEIGHT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"Inconsistent units for width and height in tag '%1' - width is specified in '%2' whereas height is specified in '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Specifica larghezze e altezze con la stessa unità di misura.</td>
</tr>
</table>
Ad eccezione di `layout=fixed`, gli attributi relativi a larghezza e altezza devono essere espressi nella stessa unità di misura.
In caso contrario viene generato questo errore.
Ad esempio, `<amp-img src="" layout="responsive" width="42px" height="42rem">` genera il seguente messaggio di errore:
"Le unità di misura relative alla larghezza e all'altezza sono disomogenee nel tag 'amp-img'. La larghezza è indicata in 'px' mentre l'altezza è indicata in 'rem'."
## Errori relativi ai modelli
Le pagine AMP non possono includere sintassi dei modelli, a meno che la sintassi sia all'interno di un tag AMP ideato appositamente per includere i modelli, ad esempio [amp-mustache](/docs/reference/extended/amp-mustache.html).
È possibile includere modelli nei file di origine, purché l'output generato da tali file non contenga i modelli (leggi anche la pagina relativa all'[utilizzo dei preprocessori CSS](/docs/guides/responsive/style_pages.html#use-css-preprocessors)).
### L'attributo contiene la sintassi di un modello
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>TEMPLATE_IN_ATTR_NAME</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"Mustache template syntax in attribute name '%1' in tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi la sintassi del modello Mustache dall'attributo.</td>
</tr>
</table>
Questo errore si verifica ogni volta che lo strumento di convalida trova la [sintassi del modello Mustache](https://mustache.github.io/mustache.5.html) nel valore di un attributo.
### L'attributo contiene la sintassi di un modello senza escape
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>UNESCAPED_TEMPLATE_IN_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The attribute '%1' in tag '%2' is set to '%3', which contains unescaped Mustache template syntax."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Aggiungi valori di escape al modello Mustache.</td>
</tr>
</table>
Questo errore si verifica ogni volta che lo strumento di convalida trova la [sintassi del modello Mustache senza escape](https://mustache.github.io/mustache.5.html) nel valore di un attributo.
### L'attributo contiene una porzione di modello
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>TEMPLATE_PARTIAL_IN_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The attribute '%1' in tag '%2' is set to '%3', which contains a Mustache template partial."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi la porzione di modello Mustache.</td>
</tr>
</table>
Questo errore si verifica ogni volta che lo strumento di convalida trova una [porzione di modello Mustache](https://mustache.github.io/mustache.5.html) nel valore di un attributo.
## Errori relativi a elementi obsoleti
### Tag obsoleto
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>DEPRECATED_TAG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>No error message defined as yet (no deprecated tags).</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>Rimuovi il tag obsoleto.</td>
</tr>
</table>
Questo avviso viene visualizzato quando nel documento AMP viene trovato un tag AMP che era valido in passato.
Si tratta solo di un avviso; i documenti AMP con avvisi sono comunque validi.
Attualmente non esistono tag obsoleti; l'avviso è destinato a futuri ritiri.
### Attributo obsoleto
<table>
<tr>
<td class="col-thirty"><strong>Codice</strong></td>
<td>DEPRECATED_ATTR</td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td>"The attribute '%1' in tag '%2' is deprecated - use '%3' instead."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correzione</strong></td>
<td>È buona norma rimuovere l'attributo obsoleto.</td>
</tr>
</table>
Questo avviso viene visualizzato quando nel documento AMP viene trovato un attributo AMP che era valido in passato.
Si tratta solo di un avviso; i documenti AMP con avvisi sono comunque validi.
Identifica gli attributi obsoleti di ogni tag AMP cercando `deprecation` nella [specifica dello strumento di convalida AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
</body>
</html>
```
--------------------------------------------------------------------------------
/content/docs/reference/validation_errors@pt_BR.md:
--------------------------------------------------------------------------------
```markdown
---
$title: Erros de validação das AMP
---
Os documentos válidos de AMP não podem incluir erros de validação.
O objetivo deste documento é ajudar você a entender melhor e corrigir erros de validação que encontrar ao [validar suas páginas AMP](/docs/guides/validate.html).
Para ter uma visão geral completa dos erros de validação, consulte as [especificações do validador das AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
[TOC]
## Erros de atributos e tag HTML das AMP
### Tag obrigatória ausente
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MANDATORY_TAG_MISSING</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The mandatory tag '%1' is missing or incorrect."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Adicionar (ou corrigir) a tag HTML obrigatória.</td>
</tr>
</table>
As seguintes tags precisam estar presentes em todos os documentos de AMP:
* <a name="doctype"></a>`<!doctype html>`
* <a name="html"></a>`<html amp> or <html ⚡>`
* <a name="head"></a>`<head>`
* <a name="canonical"></a>`<link rel="canonical" href="$SOME_URL" />`
* <a name="utf"></a>`<meta charset="utf-8">`
* <a name="viewport"></a>`<meta name="viewport" content="...">`
* <a name="boilerplate"></a>`<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>`
* <a name="ampscript"></a>`<script async src="https://cdn.ampproject.org/v0.js"></script>`
* <a name="body"></a>`<body>`
Essas tags obrigatórias incluem um campo `mandatory: true` nas [especificações do validador das AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii). Elas também são referidas nas [especificações das AMP](/docs/reference/spec.html).
### A tag exigida por outra tag está ausente
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">TAG_REQUIRED_BY_MISSING</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The '%1' tag is missing or incorrect, but required by '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Adicionar (ou corrigir) a tag HTML exigida.</td>
</tr>
</table>
O validador informa o erro `TAG_REQUIRED_BY_MISSING` quando encontra um componente estendido no documento de AMP, mas não encontra o `<script>` equivalente.
Os [componentes estendidos](/docs/reference/extended.html) precisam ser explicitamente incluídos no documento de AMP como elementos personalizados.
Para corrigir esses erros, acesse a página de referência do componente estendido, copie o script necessário e cole-lo no `<head>` do documento de AMP.
### Tag não permitida
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">DISALLOWED_TAG</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The tag '%1' is disallowed."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover a tag não permitida.</td>
</tr>
</table>
As tags são colocadas na lista de permissões, por isso não há uma lista definitiva de todas as tags não permitidas. No entanto, as [especificações das AMP](/docs/reference/spec.html) definem amplamente o conjunto de tags não permitidas.
### Atributo obrigatório ausente
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MANDATORY_ATTR_MISSING</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The mandatory attribute '%1' is missing in tag '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Adicionar atributo obrigatório à tag.</td>
</tr>
</table>
Os atributos obrigatórios para as tags AMP são definidos nas [especificações do validador de AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Basta pesquisar a tag, visualizar os atributos listados e procurar `mandatory: true`.
Os atributos obrigatórios para cada tag AMP também estão listados nas especificações da tag.
### Valor de atributo inválido
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">INVALID_ATTR_VALUE</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The attribute '%1' in tag '%2' is set to the invalid value '%3'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Corrigir o valor do atributo para um que seja válido.</td>
</tr>
</table>
Este erro indica que uma tag HTML tem um atributo com um nome permitido, mas com um valor não permitido.
Por exemplo, um acionador comum para esse erro são valores inválidos para URLs. Todos os valores de URL (nos atributos `href` e `src`) precisam corresponder a um desses [possíveis valores de atributos](http://www.w3schools.com/tags/att_a_href.asp).
<strong>IMPORTANTE:</strong> Muitos valores de URL nas AMP exigem HTTPS. Se você estiver recebendo este erro e não souber ao certo o motivo, verifique as especificações relevantes da tag AMP para ver se o atributo requer HTTPS.
### Atributo não permitido
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">DISALLOWED_ATTR</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The attribute '%1' may not appear in tag '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover o atributo da tag HTML.</td>
</tr>
</table>
Os atributos são colocados na lista de permissões, portanto não há uma lista definitiva de todos os atributos não permitidos.
Para verificar os atributos compatíveis com cada tag específica, procure a tag HTML e depois o atributo `attrs` nas [especificações do validador de AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Além de uma lista de permissões de atributos específicos para cada tag, todas as tags AMP podem usar qualquer um dos atributos da lista de permissões `$GLOBAL_ATTRS`. Todos os atributos com o prefixo `"data-"` também estão na lista de permissões.
### Texto obrigatório ausente ou incorreto
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MANDATORY_CDATA_MISSING_OR_INCORRECT</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The mandatory text (CDATA) inside tag '%1' is missing or incorrect."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Adicionar ou corrigir o texto obrigatório dentro da tag.</td>
</tr>
</table>
CDATA representa os dados de conteúdo entre uma tag HTML inicial e final, e atualmente é avaliado tanto com a lista de permissões quanto com a lista negra.
As tags com CDATA obrigatório incluem:
[sourcecode:html]
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
[/sourcecode]
e
[sourcecode:html]
<style amp-custom>
[/sourcecode]
As mensagens detalhadas para isso podem ser uma das seguintes:
* "Mandatory style boilerplate (js enabled)"
* "Mandatory style boilerplate (noscript)"
* "Disallowed -amp- CSS class name prefix"
* "Disallowed !important attribute in CSS"
* "Disallowed @charset in CSS"
* "Disallowed @import in CSS"
* "Disallowed @namespace in CSS"
* "Disallowed @supports in CSS"
* "Disallowed @document in CSS"
* "Disallowed @page in CSS"
* "Disallowed @viewport in CSS"
### Texto não permitido dentro da tag
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">CDATA_VIOLATES_BLACKLIST</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The text (CDATA) inside tag '%1' matches '%2', which is disallowed."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover o texto não permitido.</td>
</tr>
</table>
Os dados de CSS específicos foram colocados na lista negra para validar regras essenciais de CSS das AMP.
A lista a seguir inclui os dados de CSS na lista negra (ver também [`blacklisted_cdata_regex` nas especificações do validador de AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii)):
* `"\\.i?-amp-"` ("CSS -amp- class name prefix")
* `"!important"`
* `"charset"`
* `"@import"`
* `"@namespace"`
* `"@document"`
* `"@page"`
* `"@viewport"`
### Propriedade não permitida dentro do atributo na tag
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">DISALLOWED_PROPERTY_IN_ATTR_VALUE</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The property '%1' in attribute '%2' in tag '%3' is disallowed."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover a propriedade não permitida no atributo especificado.</td>
</tr>
</table>
Este erro ocorre quando o nome da propriedade dentro de um atributo não é permitido.
A propriedade do termo neste contexto faz referência aos dados estruturados chave/valor dentro de um atributo.
Por exemplo, em `<meta name="viewport content="width=device-width;minimum-scale=1">`, `width` e `minimum-scale` são nomes de propriedade.
O seguinte exemplo resultará em um erro DISALLOWED_PROPERTY_IN_ATTR_VALUE:
`<meta name="viewport content="width=device-width;invalidfoo=1">`
Como outro exemplo, o seguinte resultaria em um erro:
`<meta http-equiv="X-UA-Compatible" content="invalidfoo=edge">`
Ele deveria ser: `<meta http-equiv="X-UA-Compatible" content="ie=edge">`.
### Valor de propriedade inválido
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">INVALID_PROPERTY_VALUE_IN_ATTR_VALUE</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The property '%1' in attribute '%2' in tag '%3' is set to '%4', which is invalid."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Corrigir o valor da propriedade inválido.</td>
</tr>
</table>
Este erro ocorre quando o valor da propriedade dentro de um atributo é inválido.
A propriedade do termo neste contexto faz referência aos dados estruturados chave/valor dentro de um atributo.
Por exemplo, em `<meta name="viewport content="width=device-width;minimum-scale=1">`, `device-width` e `1` são os valores de propriedade.
O seguinte resultaria em um erro NVALID_PROPERTY_VALUE_IN_ATTR_VALUE:
`<meta name=viewport content="width=device-width;minimum-scale=invalidfoo">`
Como outro exemplo, o seguinte resultaria em um erro:
`<meta http-equiv="X-UA-Compatible" content="ie=invalidfoo">`
Ele deveria ser: `<meta http-equiv="X-UA-Compatible" content="ie=edge">`.
### URL ausente
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MISSING_URL</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"Missing URL for attribute '%1' in tag '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Adicionar o URL válido.</td>
</tr>
</table>
Este erro ocorre quando um atributo requer um URL que está ausente, por exemplo, um atributo `href` ou `src` vazio.
### URL inválido
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">INVALID_URL_PROTOCOL</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"Malformed URL '%3' for attribute '%1' in tag '%2'"</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Corrigir o URL incorreto.</td>
</tr>
</table>
Este erro ocorre quando um atributo tem um URL, mas ele é inválido.
### Protocolo de URL inválido
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">INVALID_URL_PROTOCOL</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">Invalid URL protocol '%3:' for attribute '%1' in tag '%2'.</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Alterar para um protocolo válido, por exemplo, talvez `http` precise ser `https`.</td>
</tr>
</table>
Este erro ocorre para as tags que têm um `href` ou `src` que precisa ser definido para certos protocolos.
Por exemplo, muitas tags exigem `https`.
### Propriedade obrigatória ausente no atributo
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MANDATORY_PROPERTY_MISSING_FROM_ATTR_VALUE</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The property '%1' is missing from attribute '%2' in tag '%3'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Adicionar a propriedade ausente.</td>
</tr>
</table>
Atualmente, este erro ocorre se as seguintes propriedades obrigatórias estão ausentes:
* `content="...ie=..."`
* `content="...width=..."`
* `content="...minimum-scale=..."`
Elas fazem referência a tags esperadas:
* `<meta http-equiv="X-UA-Compatible" content="ie=edge">`
* `<meta name=viewport content="width=device-width;minimum-scale=1">`
### Atributos mutuamente exclusivos
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MUTUALLY_EXCLUSIVE_ATTRS</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"Mutually exclusive attributes encountered in tag '%1' - pick one of %2."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover um dos atributos mutuamente exclusivos.</td>
</tr>
</table>
Este erro ocorre quando uma tag tem os dois atributos mutuamente exclusivos.
Por exemplo, somente um é permitido para as seguintes tags:
* [amp-twitter](/docs/reference/extended/amp-twitter.html): `data-tweetid` ou `src`
* [amp-instagram](/docs/reference/extended/amp-instagram.html): `data-shortcode` ou `src`
* [amp-iframe](/docs/reference/extended/amp-iframe.html): `src` ou `srcdoc`
* [amp-youtube](/docs/reference/extended/amp-youtube.html): `src` ou `data-videoid`
### Atributo obrigatório ausente na lista
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MANDATORY_ONEOF_ATTR_MISSING</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The tag '%1' is missing a mandatory attribute - pick one of %2." </span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Adicionar o atributo obrigatório ausente nas opções de atributo fornecidas.</td>
</tr>
</table>
Este erro ocorre quando um atributo obrigatório de várias opções está ausente na tag.
Por exemplo, estas tags exigem um atributo de uma das duas opções possíveis:
* [amp-twitter](/docs/reference/extended/amp-twitter.html): `data-tweetid` ou `src`
* [amp-instagram](/docs/reference/extended/amp-instagram.html): `data-shortcode` ou `src`
* [amp-iframe](/docs/reference/extended/amp-iframe.html): `src` ou `srcdoc`
* [amp-youtube](/docs/reference/extended/amp-youtube.html): `src` ou `data-videoid`
### Tag pai incorreta
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">WRONG_PARENT_TAG</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The parent tag of tag '%1' is '%2', but it can only be '%3'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Tornar a tag uma derivada direta da tag pai exigida.</td>
</tr>
</table>
As tags específicas requerem um pai imediato (em vez do ancestral distante).
A lista a seguir exibe o pai necessário para tags específicas (tag, pai):
* `!doctype` requer a tag pai `root`.
* `html` requer a tag pai `!doctype`.
* `head` requer a tag pai `html`.
* `body` requer a tag pai `html`.
* `link` requer a tag pai `head`.
* `meta` requer a tag pai `head`.
* `style amp-custom` requer a tag pai `head`.
* `style` requer a tag pai `boilerplate (noscript)`.
* `noscript` requer a tag pai `head`.
* `script` requer a tag pai `head`.
* `source` requer uma tag de mídia (`amp-audio`, `amp-video` etc.).
### Tag ancestral não permitida
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">DISALLOWED_TAG_ANCESTOR</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The tag '%1' may not appear as a descendant of tag '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover (ou mover) a tag aninhada não permitida.</td>
</tr>
</table>
Este erro ocorre quando uma tag é descendente de outra tag inválida.
Atualmente, o único exemplo é uma tag `template`, que não pode ser aninhada em outra tag `template`.
### Tag ancestral obrigatória
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MANDATORY_TAG_ANCESTOR</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The tag '%1' may only appear as a descendant of tag '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover a tag ou torná-la uma descendente da tag específica.</td>
</tr>
</table>
As descendentes obrigatórias são definidas nas [especificações do validador de AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii) como `mandatory_ancestor`.
O erro ocorre quando as seguintes tags estão sem `mandatory_ancestor` (tag ancestral):
* `img` precisa ser descendente de `noscript`.
* `video` precisa ser descendente de `noscript`.
* `audio` precisa ser descendente de `noscript`.
* `noscript` precisa ser descendente de `body`.
### Tag ancestral obrigatória com dica
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">MANDATORY_TAG_ANCESTOR_WITH_HINT</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The tag '%1' may only appear as a descendant of tag '%2'. Did you mean '%3'?"</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover a tag, torná-la uma descendente da tag específica ou substituí-la pela tag com dica.</td>
</tr>
</table>
O erro ocorre quando uma das seguintes tags é encontrada no documento de AMP e não está devidamente aninhada na ancestral obrigatória:
* `img` não está no pai `noscript`.
* `video` não está no pai `noscript`.
* `audio` não está no pai `noscript`.
* `noscript` não está no pai `body`.
### Tag única duplicada
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">DUPLICATE_UNIQUE_TAG</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The tag '%1' appears more than once in the document."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover uma das tags duplicadas do documento de AMP.</td>
</tr>
</table>
Este erro ocorre quando somente uma instância da tag é permitida, e uma cópia for encontrada.
A lista completa de tags únicas é conhecida:
* `<doctype html>`
* `<html amp>`
* `<head>`
* `<link rel=canonical href=...>`
* `<link rel=amphtml href=...>`
* `<meta charset="utf-8">`
* `<meta viewport>`
* `<style amp-custom>`
* `<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>`
* `<body>`
* `<script src="https://cdn.ampproject.org/v0.js">`
## Erros de estilo e layout
Antes de nos aprofundarmos em erros de estilo e layout, é importante compreender como os [estilos](/docs/guides/responsive/style_pages.html) e o [layout](/docs/guides/responsive/control_layout.html) funcionam nas AMP. Como as páginas AMP são páginas HTML, os estilos são muito parecidos com os de qualquer página HTML.
No entanto, existem algumas restrições para garantir que as páginas sejam carregadas rapidamente, e o validador de AMP impõe essas restrições.
O layout é mais controlado em páginas AMP.
Qualquer tag exibida na página requer uma altura e largura predefinidas, reduzindo significativamente os problemas de renderização e de rolagem.
Isso não significa que você precise incluir manualmente esses atributos.
Para certos tipos de layout, o validador de AMP não detecta erros, pois há a previsão dos valores padrão.
Cada tag AMP tem uma lista de `supported_layouts`, conforme definido nas [especificações do validador de AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
O validador informará erros de layouts não compatíveis e verificará as regras de validação para o layout predefinido.
### Folha de estilos muito longa
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">STYLESHEET_TOO_LONG</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The author stylesheet specified in tag 'style' is too long - we saw %1 bytes whereas the limit is %2 bytes."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Reduzir o tamanho da folha de estilo para menos de 50.000 bytes.</td>
</tr>
</table>
O validador de AMP informa este erro quando detecta que o tamanho do conteúdo estilos dentro `<style amp-custom>` ultrapassa o limite de 50.000 bytes.
### Erro de sintaxe CSS
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">CSS_SYNTAX</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"CSS syntax error in tag '%1' - %2."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Corrigir o erro de sintaxe CSS.</td>
</tr>
</table>
Este erro ocorre quando existem erros de sintaxe CSS na tag especificada.
Se você não tem certeza do que está gerando o erro, tente executar o CSS por meio de um validador CSS on-line, por exemplo, [csslint](http://csslint.net/).
### Erro de sintaxe CSS em uma regra específica
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">CSS_SYNTAX_INVALID_AT_RULE</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"CSS syntax error in tag '%1' - saw invalid at rule '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Corrigir o erro de sintaxe CSS especificado.</td>
</tr>
</table>
Este erro se refere às regras "@" dentro do CSS, para os quais a AMP só permite algumas regras
(veja também as [especificações das AMP](/docs/reference/spec.html)).
Por exemplo, `@import` não é permitido.
O erro de validação especificamente diz que a regra é inválida, facilitando a correção dela.
### O layout implícito não é compatível com a tag AMP
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">IMPLIED_LAYOUT_INVALID</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The implied layout '%1' is not supported by tag '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Fornecer um atributo de layout válido para a tag.</td>
</tr>
</table>
Este erro ocorre quando você não especifica um layout para a tag AMP, e o layout implícito (com base na largura, na altura e nos tamanhos) não é compatível.
Verifique os valores `supported_layout` para a tag nas [especificações do validador AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
O comportamento real do layout é determinado pelo atributo `layout`.
Para saber mais sobre como funciona o layout, consulte [Como controlar o layout](/docs/guides/responsive/control_layout.html) e as [Especificações do sistema de layout das AMP em HTML](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
**Observação:** se você não especificar o layout e não incluir os valores `width` e `height`, o layout será CONTAINER por padrão. O validador informará um erro, já que CONTAINER não é compatível com todas as tags AMP.
Especifique um layout diferente de CONTAINER ou adicione um valor de `width` e/ou `height`, e o erro desaparecerá.
### Atributo não permitido pelo layout implícito
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">ATTR_DISALLOWED_BY_IMPLIED_LAYOUT</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The attribute '%1' in tag '%2' is disallowed by implied layout '%3'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover o atributo não permitido da tag ou especificar um layout que permita isso.</td>
</tr>
</table>
Este erro ocorre quando você não especifica um layout para a tag AMP, e o layout implícito tem um atributo não permitido.
Os atributos não permitidos por tipos de layout são descritos nas [Especificações do sistema de layout das AMP em HTML](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### O layout especificado não é compatível com a tag AMP
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">SPECIFIED_LAYOUT_INVALID</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The specified layout '%1' is not supported by tag '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Especificar um layout compatível com a tag.</td>
</tr>
</table>
Este erro ocorre quando o layout especificado para a tag não é compatível.
Verifique os valores `supported_layout` para a tag nas [especificações do validador de AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
O comportamento real do layout é determinado pelo atributo `layout`.
Para saber mais sobre como funciona o layout, consulte [Como controlar o layout](/docs/guides/responsive/control_layout.html) e as [Especificações do sistema de layout das AMP em HTML](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### Atributo não permitido pelo layout especificado
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">ATTR_DISALLOWED_BY_SPECIFIED_LAYOUT</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The attribute '%1' in tag '%2' is disallowed by implied layout '%3'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover o atributo não permitido da tag ou especificar um layout que permita isso.</td>
</tr>
</table>
Este erro ocorre quando você especifica um layout para a tag AMP, e ele tem um atributo não permitido.
Os atributos não permitidos por tipos de layout são descritos nas [Especificações do sistema de layout das AMP em HTML](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### Valor inválido para o atributo exigido pelo layout
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">ATTR_VALUE_REQUIRED_BY_LAYOUT</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"Invalid value '%1' for attribute '%2' in tag '%3' - for layout '%4', set the attribute '%2' to value '%5'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Definir o atributo para o valor especificado.</td>
</tr>
</table>
Este erro ocorre quando o valor do atributo é inválido para o layout especificado.
Para entender o que aciona esse erro, é necessário conhecer os [diferentes comportamentos de layouts](/docs/guides/responsive/control_layout.html#size-and-position-elements).
Vamos supor que você definiu o layout como `fixed-height` e incluiu valores numéricos para `height` e `width`.
O layout de `fixed-height` assume um valor de `height`.
O atributo `width` não pode estar presente ou deve ser definido como `auto`.
O validador informa ATTR_VALUE_REQUIRED_BY_LAYOUT.
### Unidades inconsistentes de largura e altura
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">INCONSISTENT_UNITS_FOR_WIDTH_AND_HEIGHT</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"Inconsistent units for width and height in tag '%1' - width is specified in '%2' whereas height is specified in '%3'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Fornecer larguras e alturas de unidades consistentes.</td>
</tr>
</table>
Com exceção de `layout=fixed`, os atributos de largura e altura precisam ser expressos nas mesmas unidades.
Quando isso não acontece, esse erro é acionado.
Por exemplo, `<amp-img src="" layout="responsive" width="42px" height="42rem">` resulta nesta mensagem de erro:
"Unidades inconsistentes para largura e altura na tag 'amp-img'. A largura é especificada em 'px' enquanto a altura é especificada em 'rem'."
## Erros de modelos
As páginas AMP não podem incluir a sintaxe de modelos, a menos que essa sintaxe esteja dentro de uma tag AMP projetada especificamente para incluir modelos, como [amp-mustache](/docs/reference/extended/amp-mustache.html).
É possível incluir modelos em seus arquivos de origem, desde que a saída gerada por esses arquivos não tenha os modelos (veja também [Como usar pré-processadores CSS](/docs/guides/responsive/style_pages.html#use-css-preprocessors)).
### O atributo contém sintaxe de modelo
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">TEMPLATE_IN_ATTR_NAME</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"Mustache template syntax in attribute name '%1' in tag '%2'."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover do atributo a sintaxe de modelo Mustache.</td>
</tr>
</table>
Este erro ocorrerá sempre que o validador encontrar a [sintaxe de modelo Mustache](https://mustache.github.io/mustache.5.html) em um valor de atributo.
### O atributo contém sintaxe de modelo sem escape
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">UNESCAPED_TEMPLATE_IN_ATTR_VALUE</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The attribute '%1' in tag '%2' is set to '%3', which contains unescaped Mustache template syntax."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Realizar o escape do modelo Mustache.</td>
</tr>
</table>
Este erro ocorrerá sempre que o validador encontrar a [sintaxe do modelo Mustache sem escape](https://mustache.github.io/mustache.5.html) em um valor de atributo.
### O atributo contém modelo parcial
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">TEMPLATE_PARTIAL_IN_ATTR_VALUE</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The attribute '%1' in tag '%2' is set to '%3', which contains a Mustache template partial."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover o modelo Mustache parcial.</td>
</tr>
</table>
Este erro ocorre sempre que o validador encontrar um [modelo Mustache parcial](https://mustache.github.io/mustache.5.html) em um valor de atributo.
## Erros de suspensão de uso
### Tag com uso suspenso
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">DEPRECATED_TAG</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">No error message defined as yet (no deprecated tags).</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Remover a tag com uso suspenso.</td>
</tr>
</table>
Este aviso ocorre quando uma tag AMP anteriormente válida é encontrada no documento de AMP.
É somente um aviso, e os documentos de AMP com avisos continuam sendo válidos.
No momento, não existem tags com uso suspenso. A advertência é reservada para futuras suspensões de uso.
### Atributo com uso suspenso
<table>
<tr>
<td class="col-thirty"><strong>Código</strong></td>
<td><span class="notranslate">DEPRECATED_ATTR</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Formato</strong></td>
<td><span class="notranslate">"The attribute '%1' in tag '%2' is deprecated - use '%3' instead."</span></td>
</tr>
<tr>
<td class="col-thirty"><strong>Correção</strong></td>
<td>Como prática recomendada, remover o atributo com uso suspenso.</td>
</tr>
</table>
Este aviso ocorre quando um atributo das AMP anteriormente válido é encontrado no documento de AMP.
É somente um aviso, e os documentos de AMP com avisos continuam sendo válidos.
Identifique atributos com uso suspenso para cada tag AMP pesquisando `deprecation` nas [especificações do validador de AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
</body>
</html>
```
--------------------------------------------------------------------------------
/content/docs/reference/[email protected]:
--------------------------------------------------------------------------------
```markdown
---
$title: Erreurs de validation AMP
---
<!---
Copyright 2015 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.
-->
Pour être valides, les documents AMP ne doivent comprendre aucune erreur de validation.
Le but de ce document est de vous aider à mieux comprendre et à corriger les erreurs de validation que vous rencontrez lorsque vous [validez vos pages AMP](/docs/guides/validate.html).
Pour un aperçu complet des erreurs de validation, consultez les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
[TOC]
## Erreurs de balise HTML et d'attributs AMP
### Balise obligatoire manquante
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MANDATORY_TAG_MISSING</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The mandatory tag '%1' is missing or incorrect."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Ajoutez (ou corrigez) la balise HTML obligatoire.</td>
</tr>
</table>
Les balises suivantes doivent être présentes dans tous les documents AMP :
* <a name="doctype"></a>`<!doctype html>`
* <a name="html"></a>`<html amp> or <html ⚡>`
* <a name="head"></a>`<head>`
* <a name="canonical"></a>`<link rel="canonical" href="$SOME_URL" />`
* <a name="utf"></a>`<meta charset="utf-8">`
* <a name="viewport"></a>`<meta name="viewport" content="...">`
* <a name="boilerplate"></a>`<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>`
* <a name="ampscript"></a>`<script async src="https://cdn.ampproject.org/v0.js"></script>`
* <a name="body"></a>`<body>`
Ces balises obligatoires comprennent un champ `mandatory: true` dans les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii). Elles sont également référencées dans la [spécifications AMP](/docs/reference/spec.html).
### Absence d'une balise requise par une autre balise
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>TAG_REQUIRED_BY_MISSING</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The '%1' tag is missing or incorrect, but required by '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Ajoutez (ou corrigez) la balise HTML requise.</td>
</tr>
</table>
Le validateur génère l'erreur `TAG_REQUIRED_BY_MISSING` lorsqu'il trouve un composant étendu dans le document AMP, mais ne trouve pas le `<script>` équivalent.
Les [composants étendus](/docs/reference/extended.html) doivent être inclus explicitement dans le document AMP en tant qu'éléments personnalisés.
Pour corriger ces erreurs, accédez à la page de référence du composant étendu, copiez le script nécessaire et collez-le dans la section `<head>` du document AMP.
### Balise non autorisée
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>DISALLOWED_TAG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The tag '%1' is disallowed."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez la balise non autorisée.</td>
</tr>
</table>
Les balises sont ajoutées à la liste blanche. Il n'existe donc pas de liste définitive de toutes les balises interdites, toutefois les [spécifications AMP](/docs/reference/spec.html) définissent dans les grandes lignes l'ensemble de balises non autorisées.
### Attribut obligatoire manquant
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MANDATORY_ATTR_MISSING</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The mandatory attribute '%1' is missing in tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Ajoutez l'attribut obligatoire à la balise.</td>
</tr>
</table>
Les attributs obligatoires pour les balises AMP sont définis dans les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Il vous suffit de rechercher la balise, de consulter les attributs répertoriés et de vérifier qu'ils sont bien définis sur `mandatory: true`.
Les attributs obligatoires pour chaque balise AMP sont également répertoriés dans les spécifications de la balise.
### Valeur d'attribut incorrecte
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>INVALID_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The attribute '%1' in tag '%2' is set to the invalid value '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Remplacez la valeur de l'attribut par une valeur valide.</td>
</tr>
</table>
Cette erreur indique qu'une balise HTML possède un attribut avec un nom autorisé, mais une valeur interdite.
Ainsi, cette erreur se déclenche fréquemment en cas de valeurs d'URL incorrectes. Toutes les valeurs d'URL (dans les attributs `href` et `src`) doivent correspondre à l'une de ces [valeurs d'attributs possibles](http://www.w3schools.com/tags/att_a_href.asp).
**IMPORTANT** : De nombreuses valeurs d'URL AMP nécessitent le protocole HTTPS. Si vous obtenez cette erreur et que vous en ignorez la raison, vérifiez les spécifications de la balise AMP concernée pour voir si l'attribut nécessite le protocole HTTPS.
### Attribut non autorisé
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>DISALLOWED_ATTR</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The attribute '%1' may not appear in tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez l'attribut de la balise HTML.</td>
</tr>
</table>
Les attributs sont ajoutés à une liste blanche. Il n'existe donc pas de liste définitive de tous les attributs interdits.
Pour connaître les attributs compatibles avec chaque balise, recherchez la balise HTML, puis `attrs` dans les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
En plus d'une liste blanche des attributs spécifiques pour chaque balise, les balises AMP peuvent utiliser tous les attributs ajoutés à la liste blanche dans `$GLOBAL_ATTRS`. Tous les attributs avec le préfixe `"data-"` sont également acceptés.
### Texte obligatoire manquant ou incorrect
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MANDATORY_CDATA_MISSING_OR_INCORRECT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The mandatory text (CDATA) inside tag '%1' is missing or incorrect."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Ajoutez ou corrigez le texte obligatoire dans la balise.</td>
</tr>
</table>
CDATA désigne les données de contenu figurant entre des balises HTML de début et de fin. L'évaluation de ces données se fait actuellement par le biais de listes blanches et de listes noires.
Les balises avec des données CDATA obligatoires comprennent :
[sourcecode:html]
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
[/sourcecode]
Et :
[sourcecode:html]
<style amp-custom>
[/sourcecode]
Voici des exemples de messages détaillés correspondant à la description ci-dessus :
* "Mandatory style boilerplate (js enabled)"
* "Mandatory style boilerplate (noscript)"
* "Disallowed -amp- CSS class name prefix"
* "Disallowed !important attribute in CSS"
* "Disallowed @charset in CSS"
* "Disallowed @import in CSS"
* "Disallowed @namespace in CSS"
* "Disallowed @supports in CSS"
* "Disallowed @document in CSS"
* "Disallowed @page in CSS"
* "Disallowed @viewport in CSS"
### Texte non autorisé à l'intérieur de la balise
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>CDATA_VIOLATES_BLACKLIST</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The text (CDATA) inside tag '%1' matches '%2', which is disallowed."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez le texte non autorisé.</td>
</tr>
</table>
Des données CSS spécifiques ont été ajoutées à la liste noire pour valider des règles AMP CSS essentielles.
La liste suivante indique les données CSS sur liste noire (voir également `blacklisted_cdata_regex` dans les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii)) :
* `"\\.i?-amp-"` ("Préfixe de nom de classe -amp- CSS")
* `"!important"`
* `"charset"`
* `"@import"`
* `"@namespace"`
* `"@document"`
* `"@page"`
* `"@viewport"`
### Propriété non autorisée dans l'attribut d'une balise
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>DISALLOWED_PROPERTY_IN_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The property '%1' in attribute '%2' in tag '%3' is disallowed."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez la propriété non autorisée dans l'attribut spécifié.</td>
</tr>
</table>
Cette erreur se produit lorsque le nom d'une propriété à l'intérieur d'un attribut n'est pas autorisé.
Dans ce contexte, le terme propriété désigne les données structurées clé/valeur à l'intérieur d'un attribut.
Par exemple, dans `<meta name="viewport content="width=device-width;minimum-scale=1">`, `width` et `minimum-scale` sont des noms de propriétés.
Le code suivant génère une erreur DISALLOWED_PROPERTY_IN_ATTR_VALUE :
`<meta name="viewport content="width=device-width;invalidfoo=1">`
L'exemple suivant constitue également une erreur :
`<meta http-equiv="X-UA-Compatible" content="invalidfoo=edge">`
Il faudrait écrire : `<meta http-equiv="X-UA-Compatible" content="ie=edge">`.
### Valeur de propriété incorrecte
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>INVALID_PROPERTY_VALUE_IN_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The property '%1' in attribute '%2' in tag '%3' is set to '%4', which is invalid."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Corrigez la valeur de propriété incorrecte.</td>
</tr>
</table>
Cette erreur se produit lorsque la valeur de la propriété à l'intérieur d'un attribut est incorrecte.
Dans ce contexte, le terme propriété désigne les données structurées clé/valeur à l'intérieur d'un attribut.
Par exemple, dans `<meta name="viewport content="width=device-width;minimum-scale=1">`, `device-width` et `1` sont des valeurs de propriété.
L'exemple ci-dessous provoque une erreur INVALID_PROPERTY_VALUE_IN_ATTR_VALUE :
`<meta name=viewport content="width=device-width;minimum-scale=invalidfoo">`
L'exemple suivant constitue également une erreur :
`<meta http-equiv="X-UA-Compatible" content="ie=invalidfoo">`
Il faudrait écrire : `<meta http-equiv="X-UA-Compatible" content="ie=edge">`
### URL manquante
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MISSING_URL</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"Missing URL for attribute '%1' in tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Ajoutez l'URL valide.</td>
</tr>
</table>
Cette erreur se produit en l'absence de l'URL nécessaire à un attribut. Il peut notamment s'agir d'un attribut `href` ou `src` vide.
### URL incorrecte
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>INVALID_URL_PROTOCOL</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"Malformed URL '%3' for attribute '%1' in tag '%2'"</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Réparez l'URL rompue.</td>
</tr>
</table>
Cette erreur se produit lorsqu'un attribut a une URL, mais que cette dernière est incorrecte.
### Protocole d'URL incorrect
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>INVALID_URL_PROTOCOL</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>Invalid URL protocol '%3:' for attribute '%1' in tag '%2'.</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Optez pour un protocole valide. Ainsi, il vous faudra peut-être remplacer `http` par `https`.</td>
</tr>
</table>
Cette erreur se produit pour les balises dont le `href` ou `src` doivent être définis sur certains protocoles.
Ainsi, de nombreuses balises nécessitent le protocole `https`.
### Propriété obligatoire manquante pour l'attribut
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MANDATORY_PROPERTY_MISSING_FROM_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The property '%1' is missing from attribute '%2' in tag '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Ajoutez la propriété manquante.</td>
</tr>
</table>
À l'heure actuelle, cette erreur se produit en l'absence de ces propriétés obligatoires :
* `content="...ie=..."`
* `content="...width=..."`
* `content="...minimum-scale=..."`
Elles renvoient à des balises attendues :
* `<meta http-equiv="X-UA-Compatible" content="ie=edge">`
* `<meta name=viewport content="width=device-width;minimum-scale=1">`
### Attributs s'excluant mutuellement
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MUTUALLY_EXCLUSIVE_ATTRS</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"Mutually exclusive attributes encountered in tag '%1' - pick one of %2."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez l'un des attributs s'excluant mutuellement.</td>
</tr>
</table>
Cette erreur se produit lorsqu'une balise possède deux attributs s'excluant mutuellement.
Ainsi, un seul de ces attributs est autorisé pour les balises suivantes :
* [amp-twitter](/docs/reference/extended/amp-twitter.html) : `data-tweetid` ou `src`
* [amp-instagram](/docs/reference/extended/amp-instagram.html) : `data-shortcode` ou `src`
* [amp-iframe](/docs/reference/extended/amp-iframe.html) : `src` ou `srcdoc`
* [amp-youtube](/docs/reference/extended/amp-youtube.html) : `src` ou `data-videoid`
### Absence d'attribut obligatoire figurant sur la liste
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MANDATORY_ONEOF_ATTR_MISSING</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The tag '%1' is missing a mandatory attribute - pick one of %2." </td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Ajoutez l'attribut obligatoire manquant parmi les attributs proposés.</td>
</tr>
</table>
Cette erreur se produit lorsqu'une balise ne comprend aucun des attributs possibles.
Par exemple, pour les balises suivantes, il faut choisir l'un des deux attributs proposés :
* [amp-twitter](/docs/reference/extended/amp-twitter.html) : `data-tweetid` ou `src`
* [amp-instagram](/docs/reference/extended/amp-instagram.html) : `data-shortcode` ou `src`
* [amp-iframe](/docs/reference/extended/amp-iframe.html) : `src` ou `srcdoc`
* [amp-youtube](/docs/reference/extended/amp-youtube.html) : `src` ou `data-videoid`
### Balise parent incorrecte
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>WRONG_PARENT_TAG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The parent tag of tag '%1' is '%2', but it can only be '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Faites en sorte que la balise soit un enfant direct du parent requis.</td>
</tr>
</table>
Des balises spécifiques nécessitent un parent immédiat (par opposition à un ancêtre lointain).
La liste ci-dessous répertorie le parent requis pour des balises spécifiques (balise, parent) :
* `!doctype` nécessite une balise parent `root`.
* `html` nécessite une balise parent `!doctype`.
* `head` nécessite une balise parent `html`.
* `body` nécessite une balise parent `html`.
* `link` nécessite une balise parent `head`.
* `meta` nécessite une balise parent `head`.
* `style amp-custom` nécessite une balise parent `head`.
* `style` nécessite une balise parent `boilerplate (noscript)`.
* `noscript` nécessite une balise parent `head`.
* `script` nécessite une balise parent `head`.
* `source` nécessite une balise média (`amp-audio`, `amp-video`, etc.).
### Balise ancêtre non autorisée
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>DISALLOWED_TAG_ANCESTOR</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The tag '%1' may not appear as a descendant of tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez (ou déplacez) la balise imbriquée non autorisée.</td>
</tr>
</table>
Cette erreur se produit lorsqu'une balise est un descendant d'une autre balise non validée.
À l'heure actuelle, le seul exemple possible est une balise `template` non imbriquée dans une autre balise `template`.
### Balise ancêtre obligatoire
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MANDATORY_TAG_ANCESTOR</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The tag '%1' may only appear as a descendant of tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez la balise ou faites-en un descendant de la balise spécifique.</td>
</tr>
</table>
Les descendants obligatoires sont définis dans les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii) comme `mandatory_ancestor`.
L'erreur se produit en l'absence de `mandatory_ancestor` (balise, ancêtre) pour les balises suivantes :
* `img` doit être un descendant de `noscript`.
* `video` doit être un descendant de `noscript`.
* `audio` doit être un descendant de `noscript`.
* `noscript` doit être un descendant de `body`.
### Balise ancêtre obligatoire avec indicateur
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>MANDATORY_TAG_ANCESTOR_WITH_HINT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The tag '%1' may only appear as a descendant of tag '%2'. Did you mean '%3'?"</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez la balise, faites-en un descendant de la balise spécifique ou remplacez-la par la balise avec indicateur.</td>
</tr>
</table>
L'erreur se produit lorsque l'une des balises suivantes est détectée dans un document AMP, et n'est pas correctement imbriquée dans son parent obligatoire :
* `img` n'est pas dans le parent `noscript`.
* `video` n'est pas dans le parent `noscript`.
* `audio` n'est pas dans le parent `noscript`.
* `noscript` n'est pas dans le parent `body`.
### Balise unique en double
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>DUPLICATE_UNIQUE_TAG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The tag '%1' appears more than once in the document."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez l'une des balises en double du document AMP.</td>
</tr>
</table>
Cette erreur se produit lorsqu'une seule instance de la balise est autorisée, et qu'un doublon est détecté.
Voici la liste complète des balises uniques :
* `<doctype html>`
* `<html amp>`
* `<head>`
* `<link rel=canonical href=...>`
* `<link rel=amphtml href=...>`
* `<meta charset="utf-8">`
* `<meta viewport>`
* `<style amp-custom>`
* `<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>`
* `<body>`
* `<script src="https://cdn.ampproject.org/v0.js">`
## Erreurs de style et de mise en page
Avant de différencier les erreurs de style et de mise en page, il est important de comprendre comment le [style](/docs/guides/responsive/style_pages.html) et la [mise en page](/docs/guides/responsive/control_layout.html) fonctionnent dans AMP. Étant donné que les pages AMP sont des pages HTML, les styles ressemblent beaucoup à ceux de n'importe quelle page HTML.
Il existe toutefois certaines restrictions visant à assurer un chargement rapide des pages, et le validateur AMP vise à les faire respecter.
La mise en page est plus contrôlée dans les pages AMP.
Chaque balise affichée sur la page doit avoir une hauteur et une largeur prédéfinies, afin de réduire les difficultés d'affichage et de défilement de la page.
Cela ne signifie pas que vous devez inclure manuellement ces attributs.
Pour certains types de mises en page, le validateur AMP ne génère pas d'erreurs, car il considère que des valeurs par défaut sont utilisées.
Chaque balise AMP est associée à une liste de `supported_layouts`, telle que définie dans les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Le validateur génère des erreurs pour les mises en page non compatibles, et vérifie les règles de validation pour la mise en page prédéfinie.
### Feuille de style trop longue
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>STYLESHEET_TOO_LONG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The author stylesheet specified in tag 'style' is too long - we saw %1 bytes whereas the limit is %2 bytes."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Réduisez la taille de la feuille de style à moins de 50 000 octets.</td>
</tr>
</table>
Le validateur AMP génère cette erreur lorsqu'il calcule que la taille du contenu des styles de `<style amp-custom>` dépasse 50 000 octets.
### Erreur de syntaxe CSS
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>CSS_SYNTAX</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"CSS syntax error in tag '%1' - %2."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Corrigez l'erreur de syntaxe CSS.</td>
</tr>
</table>
Cette erreur se produit lorsque des erreurs de syntaxe CSS figurent dans la balise spécifiée.
Si vous ne parvenez pas à identifier la source de l'erreur, essayez d'exécuter le CSS par le biais d'un validateur CSS en ligne, par exemple [csslint](http://csslint.net/).
### Erreur de syntaxe CSS pour une règle spécifique
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>CSS_SYNTAX_INVALID_AT_RULE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"CSS syntax error in tag '%1' - saw invalid at rule '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Corrigez l'erreur de syntaxe CSS spécifiée.</td>
</tr>
</table>
Cette erreur renvoie aux règles CSS de type @. AMP n'accepte que certaines de ces règles (voir aussi les [spécifications AMP](/docs/reference/spec.html)).
Par exemple, `@import` est interdit.
L'erreur de validation vous indique précisément la règle incorrecte, ce qui permet de corriger plus facilement la règle concernée.
### La mise en page implicite n'est pas compatible avec la balise AMP
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>IMPLIED_LAYOUT_INVALID</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The implied layout '%1' is not supported by tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Fournissez un attribut de mise en page valide pour la balise.</td>
</tr>
</table>
Cette erreur se produit lorsque vous ne spécifiez pas de mise en page pour la balise AMP, et que la mise en page implicite (en fonction de la largeur, de la hauteur et de la taille) n'est pas acceptée.
Vérifiez les valeurs `supported_layout` pour la balise dans les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Le comportement de la mise en page est déterminé par l'attribut `layout`.
Pour en savoir plus sur la mise en page, consultez la page d'aide relative au [contrôle de la mise en page](/docs/guides/responsive/control_layout.html), ainsi que les [spécifications du système de mise en page AMP HTML](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
**Remarque** : Si vous ne spécifiez pas de mise en page et si vous n'incluez pas les valeurs `width` et `height`, la mise en page par défaut est de type CONTAINER. Le validateur génère une erreur, car le format CONTAINER n'est compatible avec aucune balise AMP.
Spécifiez une mise en page autre que CONTAINER, ou ajoutez une valeur `width` ou `height` pour corriger l'erreur.
### Attribut non autorisé par la mise en page implicite
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>ATTR_DISALLOWED_BY_IMPLIED_LAYOUT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The attribute '%1' in tag '%2' is disallowed by implied layout '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez l'attribut non autorisé de la balise ou spécifiez une mise en page qui l'accepte.</td>
</tr>
</table>
Cette erreur se produit lorsque vous ne spécifiez pas de mise en page pour la balise AMP et que la mise en page implicite contient un attribut non autorisé.
Les attributs interdits selon les types de mises en page sont décrits dans la [spécification du système de mise en page AMP HTML](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### La mise en page spécifiée n'est pas compatible avec la balise AMP
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>SPECIFIED_LAYOUT_INVALID</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The specified layout '%1' is not supported by tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Spécifiez une mise en page compatible avec la balise.</td>
</tr>
</table>
Cette erreur se produit lorsque la mise en page spécifiée pour la balise n'est pas acceptée.
Vérifiez les valeurs `supported_layout` pour la balise dans les [spécifications du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
Le comportement de la mise en page est déterminé par l'attribut `layout`.
Pour en savoir plus sur la mise en page, consultez la page d'aide relative au [contrôle de la mise en page](/docs/guides/responsive/control_layout.html), ainsi que les [spécifications du système de mise en page AMP HTML](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### Attribut non autorisé par la mise en page spécifiée
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>ATTR_DISALLOWED_BY_SPECIFIED_LAYOUT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The attribute '%1' in tag '%2' is disallowed by implied layout '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez l'attribut non autorisé de la balise ou spécifiez une mise en page qui l'accepte.</td>
</tr>
</table>
Cette erreur se produit lorsque vous spécifiez une mise en page pour la balise AMP et que la mise en page contient un attribut non autorisé.
Les attributs interdits selon les types de mises en page sont décrits dans la [spécification du système de mise en page AMP HTML](https://github.com/ampproject/amphtml/blob/master/spec/amp-html-layout.md).
### Valeur incorrecte pour l'attribut requis par la mise en page
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>ATTR_VALUE_REQUIRED_BY_LAYOUT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"Invalid value '%1' for attribute '%2' in tag '%3' - for layout '%4', set the attribute '%2' to value '%5'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Définissez l'attribut sur la valeur spécifiée.</td>
</tr>
</table>
Cette erreur se produit lorsque la valeur de l'attribut est incorrecte pour la mise en page spécifiée.
Pour comprendre ce qui déclenche cette erreur, vous devez vous familiariser avec les [différents comportements des mises en page](/docs/guides/responsive/control_layout.html#size-and-position-elements).
Par exemple, vous définissez la mise en page sur `fixed-height` et vous intégrez des valeurs numériques pour `height` et `width`.
La mise en page `fixed-height` utilise une valeur `height`.
L'attribut `width` ne doit pas être présent ou doit être défini sur `auto`.
Le validateur génère l'erreur ATTR_VALUE_REQUIRED_BY_LAYOUT.
### Unités de hauteur et de largeur incohérentes
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>INCONSISTENT_UNITS_FOR_WIDTH_AND_HEIGHT</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"Inconsistent units for width and height in tag '%1' - width is specified in '%2' whereas height is specified in '%3'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Indiquez des unités de hauteur et de largeur cohérentes.</td>
</tr>
</table>
À l'exception de `layout=fixed`, les attributs de largeur et de hauteur doivent être exprimés dans la même unité.
Dans le cas contraire, cette erreur est générée.
Par exemple, `<amp-img src="" layout="responsive" width="42px" height="42rem">` entraîne le message d'erreur suivant :
"La balise 'amp-img' contient des unités incohérentes pour la largeur et la hauteur. La largeur est indiquée en 'px', alors que la hauteur est indiquée en 'rem'."
## Erreurs de création de modèles
Les pages AMP ne peuvent pas inclure de syntaxe de création de modèles, sauf si cette syntaxe est comprise dans une balise AMP spécialement conçue pour intégrer des modèles, par exemple [amp-mustache](/docs/reference/extended/amp-mustache.html).
Vous pouvez inclure des modèles dans vos fichiers source, tant que le fichier de sortie ne contient pas les modèles (voir aussi [Utiliser des préprocesseurs CSS](/docs/guides/responsive/style_pages.html#use-css-preprocessors)).
### L'attribut contient une syntaxe de modèle
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>TEMPLATE_IN_ATTR_NAME</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"Mustache template syntax in attribute name '%1' in tag '%2'."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez la syntaxe de modèle Mustache de l'attribut.</td>
</tr>
</table>
Cette erreur se produit à chaque fois que le validateur trouve une [syntaxe de modèle Mustache](https://mustache.github.io/mustache.5.html) dans une valeur d'attribut.
### L'attribut contient une syntaxe de modèle sans caractère d'échappement
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>UNESCAPED_TEMPLATE_IN_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The attribute '%1' in tag '%2' is set to '%3', which contains unescaped Mustache template syntax."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Ajoutez un caractère d'échappement au modèle Mustache.</td>
</tr>
</table>
Cette erreur se produit à chaque fois que le validateur trouve une [syntaxe de modèle Mustache sans caractère d'échappement](https://mustache.github.io/mustache.5.html) dans une valeur d'attribut.
### L'attribut contient un extrait de modèle
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>TEMPLATE_PARTIAL_IN_ATTR_VALUE</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The attribute '%1' in tag '%2' is set to '%3', which contains a Mustache template partial."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez l'extrait de modèle Mustache.</td>
</tr>
</table>
Cette erreur se produit à chaque fois que le validateur trouve un [extrait de modèle Mustache](https://mustache.github.io/mustache.5.html) dans une valeur d'attribut.
## Erreurs d'obsolescence
### Balise obsolète
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>DEPRECATED_TAG</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>No error message defined as yet (no deprecated tags).</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Supprimez la balise obsolète.</td>
</tr>
</table>
Cet avertissement s'affiche lorsqu'une balise AMP valide par le passé se trouve dans le document AMP.
Il s'agit seulement d'un avertissement ; les documents AMP présentant des avertissements restent valides.
Aucune balise obsolète n'existe actuellement. L'avertissement concernera les obsolescences futures.
### Attribut obsolète
<table>
<tr>
<td class="col-thirty"><strong>Code</strong></td>
<td>DEPRECATED_ATTR</td>
</tr>
<tr>
<td class="col-thirty"><strong>Format</strong></td>
<td>"The attribute '%1' in tag '%2' is deprecated - use '%3' instead."</td>
</tr>
<tr>
<td class="col-thirty"><strong>Correction</strong></td>
<td>Nous vous conseillons de supprimer les attributs obsolètes.</td>
</tr>
</table>
Cet avertissement s'affiche lorsqu'un attribut AMP valide par le passé se trouve dans le document AMP.
Il s'agit seulement d'un avertissement ; les documents AMP présentant des avertissements restent valides.
Identifiez les attributs obsolètes pour chaque balise AMP en recherchant `deprecation` dans la [spécification du validateur AMP](https://github.com/ampproject/amphtml/blob/master/validator/validator-main.protoascii).
</body>
</html>
```