Create the image ad

Inside the <body> of your AMPHTML ad document, you can include HTML and AMP tags; however, not all tags are allowed. Refer to the AMPHTML ad spec for a list of allowed tags.

Our ad is a simple image with a hyperlink to the advertised site. We'll display the image using the amp-img tag. Here's the code:

  <a target="_blank" href="">
    <amp-img width="300" height="250"
        alt="Learn amp"

If you open your html file in your browser, you should see the following image:

If you click the image ad, it takes you to the advertised site (i.e., the AMP Project site).