Book Image

AMP: Building Accelerated Mobile Pages

By : Ruadhan O'Donoghue
Book Image

AMP: Building Accelerated Mobile Pages

By: Ruadhan O'Donoghue

Overview of this book

Google introduced the Accelerated Mobile Pages (AMP) project to give mobile users lightning-fast response times when accessing web pages on mobile devices. AMP delivers great user experiences by providing a framework for optimizing web pages that otherwise would take much longer to load on a mobile platform. This book shows how to solve page performance issues using the mobile web technologies available today. You will learn how to build instant-loading web pages, and have them featured more prominently on Google searches. If you want your website to succeed on mobile, if you care about SEO, and if you want to stay competitive, then this book is for you! You will go on a mobile web development journey that demonstrates with concrete examples how to build lightning-fast pages that will keep your visitors on-site and happy. This journey begins by showing how to build a simple blog article-style web page using AMP. As new concepts are introduced this page is gradually refined until you will have the skills and confidence to build a variety of rich and interactive mobile web pages. These will include e-commerce product pages, interactive forms and menus, maps and commenting systems, and even Progressive Web Apps.
Table of Contents (24 chapters)
Title Page
Credits
About the Author
Acknowledgements
About the Reviewer
www.Packtpub.com
Customer Feedback
Preface
14
Actions and Events
16
amp-bind Permitted Attribute Bindings

HTML tags that aren't allowed in AMP


You're free to use most HTML elements in your AMP pages. Some are restricted however. Generally, elements that have a performance impact, for example, elements that involve external HTTP requests, are forbidden. For some of these, replacement AMP tags provide similar functionality but in a performance-optimized way.

In general, you can use any HTML tag as usual if it is not listed in the following sections in the forbidden or has-an-AMP-alternative tag lists.

Forbidden HTML tags

The following tags are outright banned in AMP pages:

base, frame, frameset, object, param, applet, and embed.

HTML tags with AMP-HTML replacements

The following table shows HTML tags that are forbidden and for which there are AMP alternatives:

HTML tag

AMP-HTML version

img

amp-img

video

amp-video

audio

amp-audio

iframe

amp-iframe

HTML tags that are allowed, but with restrictions

These are HTML tags that are allowed in AMP pages, but which have some special requirements:

HTML tag

Conditions

script

To...