Questions tagged [amp-html]

AMP HTML (Accelerated Mobile Pages HTML) is a project to make the web faster as well as easier to develop. It is a set of HTML tags, a JavaScript library, and a cache for AMP-compliant pages.

The project homepage is at https://amp.dev/, and the framework source code can be found at https://github.com/ampproject/amphtml.

AMP HTML is HTML with some restrictions for reliable performance and some extensions for building rich content beyond basic HTML. The AMP JS library ensures the fast rendering of AMP HTML pages.

An easy-to-follow tutorial can be found on the project's homepage.

Validating AMP pages

There are five ways to validate an AMP page:

  1. Browser Developer Console - Add #development=1 to the URL, for example http://localhost:8000/released.amp.html#development=1, then check the browser console for validation errors.
  2. Web Interface - Paste the URL (or the page code) at https://validator.ampproject.org/
  3. Browser Extension - Use the AMP Validator extension for Chrome.
  4. NPM Packages for CI - Example
  5. Command Line Tool - Example

You can also use the Structured Data Testing Tool to validate Schema.org markup.

##Some Useful Link

AMP START

Build responsive, lightning-fast AMP pages with the help of pre define templates and components

AMP DEV

A hands-on introduction to Accelerated Mobile Pages (AMP) focusing on code and live samples. Learn how to create AMP pages and see examples for all AMP components.

WPZA's AMP WordPress Guides

Useful AMP guides for WordPress developers, helping to make WordPress websites AMP friendly (without plugins).

AMPproject.org moves to amp.dev! Additionally AMP resources were scattered across multiple websites like ampbyexample.com and ampstart.com is also move on amp.dev

2310 questions
0
votes
1 answer

With AMP HTML, is it possible to get ID or other properties from clicked element, append them and create URL for an anchor tag?

I have a set of check input. Each one contains a unique ID. On checking box (on click) I want to get this ID and create a string of type '/some/path/?myids=checkOne,checkTwo (where checkOne and checkTwo are IDs of two different check input that have…
0
votes
1 answer

How do I create a collapsible like Bootstrap in AMP?

I am trying to create a collapsible in AMP with a sleek animation like Bootstrap has. Now, I can create a collapsible with toggling a class and adjusting some height with CSS, but if I do so I will be giving a fixed height for all the collapsible,…
0
votes
1 answer

AMP Validator reporting custom CSS greater than 50,000 when it isn't

I have noticed that the AMP Validator, (a) doesn't tell you how big your CSS file is until it is too big. (b) when it is too big and you manually count the length of your CSS it still seems to be smaller than the 50,000 limit. Anyone have any ides…
Alan Jay
  • 151
  • 1
  • 11
0
votes
1 answer

AMP-IFRAME same origin for iframe

It's an known issue that AMP Policy explicity forbides embeding Iframes with same orgin while setting the sandobox attributes: But as stated here: Setting both…
Christian Felix
  • 644
  • 1
  • 9
  • 28
0
votes
1 answer

amp-date-picker returning incorrect dates

When using amp-date-picker and use it to save an amp-state both event.start and event.end return 1 day after the date selected. Example: I pick 5/15/2019 - 5/22/2019, it returns 5/16/2019 - 5/23/2019. …
Trevor Geene
  • 479
  • 3
  • 12
0
votes
1 answer

Return entire images via AMP-List?

We are attempting to return the entire image tag via AMP-List, rather than just the source URL. Example: AMP-List Markup: {{{amp_image}}} JSON Returned: {"amp_image":""} However, with this example and many variations -…
Midnightly Coder
  • 1,053
  • 1
  • 11
  • 23
0
votes
1 answer

How to measure speed in Google Analytics for AMP pages?

We implemented AMP to our site a couple of months ago. We're tracking visits correct in Google Analytics but the speed dimensions are empty, we have no sample pages measured. How can I get the load time in amp pages? In amp-analytics config I put…
0
votes
1 answer

amp-date-countdown script is running fine but does not validate

I am dynamically setting time left in amp-date-countdown: