Assuming that you have a basic familiarity with HTML, we'll use a simple HTML5 news page as our jump-in point, and we'll convert it to AMP-HTML. Unless you are building a canonical AMP page, that is, a standalone AMP page that doesn't have a desktop counterpart, then a common task you may find yourself doing is converting a full HTML page to AMP-HTML. That's what we're going to do now.
Below is a screenshot of the page we'll be working with. It's a simplified version of a typical news article page. It includes some key items that we'll convert to AMP-HTML in this chapter. These are the header, logo, nav menu, article title, feature image, article content, and footer. In subsequent chapters we'll refine and improve the AMP page as we go along.
Our first AMP page!
The HTML behind this page is listed below, and can also be found at /ch2/news.html
. There's nothing difficult here, but if you don't understand this markup, now would be a good time to brush up on your HTML...