Accelerated Mobile Pages

From Just Solve the File Format Problem
Revision as of 12:18, 21 May 2017 by Dan Tobias (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
File Format
Name Accelerated Mobile Pages
Ontology
Extension(s) .amp.html
Released 2015

Accelerated Mobile Pages (AMP) are a variant of HTML promoted by Google (along with some other companies) as a way of enabling publishers to produce mobile web pages that load and render quickly and are easy to read and navigate on portable devices.

AMP documents are built with a limited subset of HTML, augmented with some AMP-specific tags to handle graphics and multimedia content. Among these specialized tags is a tag specifically for embedded ads (amp-ad), replacing the hodgepodge of bulky and messy scripts usually used for this purpose. Images use amp-img instead of the normal img tag, but the pages still work (images and all) in normal browsers (both mobile and desktop) because the referenced AMP script (the only permitted JavaScript in AMP documents besides a strictly-limited use of service-specific scripts) handles these special tags.

Headers

AMP pages have a normal HTML 5 doctype, <!doctype html>, so they are not distinguished from normal HTML this way. However, the main html element has a special attribute, <html ⚡>, featuring the Unicode character U+26A1, "HIGH VOLTAGE SIGN". This is a departure from usual markup-language conventions where non-ASCII characters are avoided in markup syntax (even if they are present in the text content) to avoid the various character-encoding problems that often result from their use; they are apparently presuming that everybody has "gone native" with UTF-8 and can handle a wider character repertoire. However, you are allowed to use <html amp> if you don't want to use non-ASCII characters or have no idea how to type that lightning-bolt thingy (though you can copy-and-paste it from another place, including this page).

Specs

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox