Search
Clear search
Close search
Google apps
Main menu

Fix upload errors for Gmail custom HTML ads

When creating custom HTML Gmail ads, it's possible that you may experience an issue. Below is a list of common issues encountered when creating custom HTML ads, and how to fix them.

Tip

Before creating your custom HTML Gmail ads, review the Gmail ads policies for technical requirements and creative specifications.

Navigating your custom HTML zip file

When you upload custom HTML to Gmail ads, you'll use a zip file that contains all of the assets for your ads. Sometimes these files look like a zipper (Zip file). Many of the errors below require you to open your zip file to make changes and then save and re-zip your file.

To make changes or updates inside of the file:

  1. Double click on the file name to unzip it.
  2. Once the file unzips, you'll see a folder. Click this folder to expand the contentes.
  3. Inside the folder, you should see other files, including the teaser.txt file.

Here's how this might look

Zip file example_folder.zip
example folder example_folder

  • Images folder images
  • Logo image logo.png
  • Index folder index.html
  • Teaser.txt teaser.txt

Images: all images for your Gmail ad will need to be inside of this folder.

Logo.png or teaser.png: this should be the image for your ad's logo or teaser image.

Index.htm: this is the HTML file for your ad. You can view and make changes to this either in your browser or in a text editor.

Teaser.txt: this is the text for your Gmail ad. It includes the standard ad information for Gmail ads, such as Advertiser name, Sender, and Display URL.

To save and rezip your file

  1. To save the updated version, go to the "File" menu, and click Save.
  2. Compress all of the files into a new zip. Select all of the files in the folder, and click File > Compress items.
  3. If your folder doesn't zip correctly, it might be because you compressed the folder. Make sure to select each item, not the entire folder.
Advertiser name

To fix errors in the "Advertiser" name field, you’ll need to open your teaser.txt file. For steps to find your teaser.txt file, see how to navigate your zip file.

  1. Double click the teaser.txt file in your zip folder.
  2. Once the file opens, look for the “Advertiser” or “Sender” field and check that it meets the following requirements:
    1. Must have no more than 15 standard-size characters (or 7 double-width characters) including spaces.
  3. Update the text in the fields to meet the requirements. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select all of the files in the folder, and click File > Compress items.

Note

If there are multiple “Advertiser” or “Sender” lines in the teaser.txt file, only the first line will be used.

Example:

  1. Sender:exampleclient
  2. Sender:exampleclient2

Only the first option, "exampleclient" will be used, not "exampleclient2".

Teaser.txt file is missing from the zip

To fix a "Missing teaser.txt file" error, first look for the teaser.txt file. It should be inside of your compressed HTML zip file. For steps to find your teaser.txt file, see how to navigate your zip file.

  1. Look for the "teaser.txt" file and make sure it meets these requirements
    1. The title of the file must be exactly “teaser.txt” without capitalization or any other characters
    2. Must be a text file with the file extension: .txt
  2. Update the text in the fields to meet the requirements. To save the updated version, go to the "File" menu, and click Save.
  3. Compress all of the files into a new zip. Select all of the files in the folder, and click File > Compress items.
Display URL

To fix errors in the "Display URL" field, you’ll need to open the teaser.txt file. It should be inside of your compressed HTML zip file. For steps to find your teaser.txt file, see how to navigate your zip file.

The Display URL will automatically appear in AdWords when you upload a zip file that includes the ‘Url’ in the teaser.txt file. However, removing the URL in Adwords won't fix this error. To make changes, update the teaser.txt file and re-upload the creative.

To open your teaser.txt, double click the file name or icon.

  1. In the file text, look for the “Display Url" field and check that it meets these requirements:
    1. Must have no more than 32 standard-size characters (or 16 double-width characters).
  2. Update the text in the fields to meet the requirements. To save the updated version, go to the "File" menu, and click Save.
  3. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Subject

To fix errors in the "Subject" field, you’ll need to open to the teaser.txt file. It should be inside of your compressed HTML zip file. For steps to find your teaser.txt file, see how to navigate your zip file.

To open your teaser.txt, double click the file name or icon.

  1. Look for the "Subject" field and check that it meets these requirements:
    1. Subject must have no more than 25 standard-size characters (or 12 double-width characters).
  2. Update the text in the fields to meet the requirements. To save the updated version, go to the "File" menu, and click Save.
  3. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.

Note

If there are multiple “Advertiser” or “Sender” lines in the teaser.txt file, only the first line will be used.

Example:

  1. Sender:exampleclient
  2. Sender:exampleclient2

Only the first option, "exampleclient" will be used, not "exampleclient2".

Description

To fix errors with the "Description" or “Body” field, you’ll need to open the teaser.txt file. It should be inside of your compressed HTML zip file. For steps to find your teaser.txt file, see how to navigate your zip file.

  1. Look for the "Description" or "Body" field and check that it meets these requirements.
    1. No more than one “Description” or “Body”
    2. Must have no more than 100 standard-size characters (or 50 double-width characters).
    3. Must be no more than 3 lines.
    4. Dynamic fields are not supported.
  2. Update the text in the fields to meet the requirements. To save the updated version, go to the "File" menu, and click Save.
  3. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Logo

To fix errors with the "Logo" field, you’ll need to open the logo.png or teaser.png file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your teaser.png file, see how to navigate your zip file.

To open your teaser.txt, double click the file name or icon.

  1. Look for the "Logo" field and check to see if the file meets all requirements. The logo.png or teaser.png file must:
    1. Be the correct file type (PNG, GIF, or JPG)
    2. Be properly encoded
    3. Use the correct syntax: must read exactly "teaser.png" or "logo.png"
      1. The file extension can be any supported file type (PNG, GIF, or JPG).
    4. Not be an animated GIF
    5. Be less than 500KB
    6. Have dimensions smaller than 144px wide or 144px tall
  2. Update the text in the fields to meet the requirements. To save the updated version, go to the "File" menu, and click Save.
  3. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
HTML

To fix errors with the HTML, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find files, see how to navigate your zip file.

  1. Check to see if the file meets the following requirements for index.html files:
    1. Correct syntax: the title is exactly "index.html"
    2. All links are clickable
    3. File is encoded correctly. Encoding is usually found in the Preferences section of your text editing tool and is called "Encoding": Make sure the encoding format is UTF-8.
  2. Update the text in the fields to meet the requirements. To save the updated version, go to the "File" menu, and click Save.
  3. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
CSS in the body is malformed

Only supported CSS can be included in the HTML file.

  1. If someone else created your HTML file, share this error message including the line number with the malformed CSS.
  2. If you're able to change the HTML in your index.html file, open and remove any unsupported CSS or markup, including stylesheets or JavaScript.

Supported CSS

Note: Not all possible values of each property are supported.

background-attachment', border-top-right-radius', margin',
background-clip', border-top-style', max-height',
background-color', border-top-width', max-width',
background-image', border-top', min-height',
background-origin', border-width', min-width',
background-position', border', outline-color',
background-repeat', font-family', outline-style',
background-size', font-size', outline-width',
background', caption-side', outline',
border-bottom-color', clear', overflow-x',
border-bottom-left-radius', color', overflow-y',
border-bottom-right-radius', direction', overflow',
border-bottom-style', display', padding-bottom',
border-bottom-width', empty-cells', padding-left',
border-bottom', float', padding-right',
border-collapse', font-stretch', padding-top',
border-color', font-style', padding',
border-left-color', font-variant', quotes',
border-left-style', font-weight', table-layout',
border-left-width', font', text-align',
border-left', letter-spacing', text-decoration',
border-radius', line-height', text-indent',
border-right-color', list-style-image', text-overflow',
border-right-style', list-style-position', text-transform',
border-right-width', list-style-type', vertical-align',
border-right', list-style', white-space',
border-spacing', margin-bottom', width',
border-style', margin-left', word-break',
border-top-color', margin-right', word-spacing',
border-top-left-radius', margin-top', word-wrap',

Supported markup languages:

  • HTML

Unsupported markup languages:

  • No Javascript (inline or linked .js files)
  • No Stylesheets (style attribute in tags is allowed)
  • No Flash, HTML5, Audio, iFrames or animated images (including animated GIFs)
The source URL of a referenced image is blank

This error means that the file includes an image that doesn't link to a source or URL. To fix this, check with your creative developer to see if each image included in the index.html has a valid URL. Images in the index.html should be referenced as <img src="images/image name"/>. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find files, see how to navigate your zip file.

  1. Open the index.html using a text editor, preferably one with syntax highlighting.
  2. Check that all <img src= references:
    1. Include a valid working source or URL
    2. Are in the format <img src="images/image name"/>
  3. Update the links in the HTML to include the correct source. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
The URL in the body is invalid

This error means the index.html file includes a URL within an <a> tag that needs to be removed or replaced. You’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find files, see how to navigate your zip file.

To fix this, search the index.html file for the URL indicated in the error message. Check to make sure the URL is valid, or replace it with the correct one. Otherwise, remove the <a> tag.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Check that all <a href = references:
    1. Include a valid working source or URL
    2. Include URLs with properly encoded special characters. For example, spaces and pound signs (#) must be encoded.
  3. Update the links in the HTML to include the correct URLs. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Web link must be an absolute URL

All URLs included in both the teaser.txt and index.html files must be "absolute".

Absolute URLs:

  • Must include an "http://" at the beginning
  • Cannot have un-encoded special characters such as # or spaces.

To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Update the links in the HTML to include absolute URLs. To save the updated version, go to the "File" menu, and click Save.
  3. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
An image in the body as a file extension that is not allowed

All image files in your zip file must be one of the supported file types.

Supported file types

  • PNG (.png)
  • GIF (.gif)
  • JPEG (.jpeg)

To fix this, you'll need to review the index.html file and “Images” folder in your zip. For steps to find your files, see how to navigate your zip file.

  1. Open the "Images" folder by double clicking the name or the icon.
  2. Remove any unsupported file types.
    1. Note: If your files includes a thumb.db file, remove this as well.
  3. Open the index.html using a text editor, preferably one with syntax highlighting.
  4. Check the index.html file to make sure all of the image sources include supported file types.
  5. Once you've removed any unsupported files, save the updated version. Go to the "File" menu, and click Save.
  6. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Some of your linked images could not be found

All image files referenced in the index.html file must be included in the “Images" folder. To fix these errors, you'll need to review the index.html file and “Images” folder in your zip. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Look for the <img src= references in your index.html file and note which image files are referenced.
  3. Open the "Images" folder by double clicking the name or the icon. Make sure all image files referenced in the index.html are present in the "Images" folder.
  4. If some images are missing, upload them into the "Images" folder.
  5. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Unable to find an external image

All image files referenced in the index.html file must be included in the “Images" folder. To fix these errors, you'll need to review the index.html file and “Images” folder in your zip. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Look for the <img src= references in your index.html file and note which image files are referenced.
  3. Open the “Images” folder by double clicking the name or the icon. Make sure all image files referenced in the index.html are present in the “Images” folder.
  4. If some images are missing, upload them into the “Images” folder.
  5. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Contains a form element which is missing a valid 'action'

This error relates to the index.html file in your zip. For steps to find your files, see how to navigate your zip file.

All forms must contain a valid 'action'. The action="" attribute indicates where to send the data from the form responses. Usually, this is the URL of the landing page that has been set up to receive the form submission data. To fix this error, open your index.html file, and find the form code.

Here is an example of correct HTML code for a form. The <form action= tag includes a valid, absolute URL.

<form action="https://www.google.com/search" method="get">
<input type="text" name="query">
<input type="submit" value="Search">
</form>
  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Update the code in the HTML to include a valid action= tag.
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Contains a form element which is missing an input with type 'submit'

All forms need to include an <input type="submit"> in the HTML code. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

Here is an example of a form with a correct “submit”:

<form action="https://www.google.com/search" method="get">
<input type="text" name="query">
<input type="submit" value="Search">
</form>
  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Update the code in the HTML to include a valid input type="submit".
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Contains a form inside of a form

This error message means you have a form within a form. You should only have one set of form tags: <form> and </form>. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

Here is an example of a correct form:

<form action="https://www.google.com/search" method="get">
<input type="text" name="query">
<input type="submit" value="Search">
</form>
  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Update the code in the HTML to remove any <form><form> or </form></form> tags.
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Some form inputs are not contained in a <form> tag

This error message means that you have an input field outside of the form tags. All of your form content should be within the form tags: <form> and </form>. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

Incorrect form

<input type="text" name="query">
<form action="https://www.google.com/search" method="get">
<input type="submit" value="Search">
</form>

Correct form

<form action="https://www.google.com/search" method="get">
<input type="text" name="query">
<input type="submit" value="Search">
</form>
  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Update the code in the HTML to make sure you have pairs of <form> and </form> tags.
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Google Docs are not supported for ads with forms

Gmail ads don't support Google Docs, so you'll need to remove any references to docs.google.com from your file. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Update the code in the HTML to make sure you aren't linking to or using Google docs in your code.
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
All files in the zip must have proper file names

All files must have proper file names. To fix these errors, you'll need to review the index.html file and “Images” folder in your zip. For steps to find your files, see how to navigate your zip file. To open the index.html file, use a text editor, preferably one with syntax highlighting.

File names must start with either a letter (alphabet), number (digit), or underscore (_), followed by a letter (alphabet), number (digit), underscore (_) or dash (-) and must be 4-200 characters long.

Once you've updated the names for your files, you'll need to compress all of the files into a new zip by selecting the files in the folder, and clicking File > Compress items.

Mailto URLs are not supported

This error refers to the URLs in your index.html file. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Search the HTML code for all references of "Mailto:" and remove them.
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
The URL in the body is invalid.

This error refers to the domain of the URLs in your index.html file. Google.com domains are not supported in Gmail ads. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. Search the HTML code for all references of "google.com" and remove them.
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.

Note

All information will be passed directly to you via the GET or POST method, nothing is passed or saved on Google servers. You are responsible for processing the data.

Maximum of 15 destination URL links

This error refers to the URLs in your index.html file. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. In the HTML code, remove all but 15 destination URLs. Keep in mind, click-to-call links are not included in this total.
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Maximum of 5 <form> tags are allowed

This error refers to the <form> tags in your index.html file. Gmail ads only allow up to 5 <form> tags. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. In the HTML code, remove all but 5 of the <form> tags.
  3. To save the updated version, go to the "File" menu, and click Save.
  4. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
Maximum of 5 click-to-call links

This error refers to the click-to-call URLs in your index.html file. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

  1. Use a text editor to open the index.html file, preferably one with syntax highlighting.
  2. In the HTML code, remove all but 5 of the click to call links.
  3. The correct format for a phone number is: "+1 650 000 0000". The following styles are also accepted:
    1. +1 650-000-0000
    2. +1 650.000.0000
    3. +16500000000
  4. To save the updated version, go to the "File" menu, and click Save.
  5. Compress all of the files into a new zip. Select the files in the folder, and click File > Compress items.
The final creative was larger than 1.25MB

This error may mean that the images in your zip file are too large. Check the images in the zip folder to see if there are any that are larger than 500kb. If you have a .psd version of the images in the zip file, those are usually too large, and can't be used in Gmail ads.

However, any file within the zip folder can contribute to this size limit. Check to see if there are any additional images or files in the zip folder that aren't being used by the ad, and remove them.

When you're ready, compress all of the files into a new zip by selecting the files in the folder, and clicking File > Compress items.

Unsupported HTML or CSS

This error means the code used in your index.html file isn't supported by Gmail ads. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

The following items are not allowed and will result in your ad being disapproved. See the policy for Gmail ads.

  • Impression pixels
  • 3rd party pixels and dynamic click trackers (only static click trackers can be used)

Supported CSS

Note: Not all possible values of each property are supported.

background-attachment', border-top-right-radius', margin',
background-clip', border-top-style', max-height',
background-color', border-top-width', max-width',
background-image', border-top', min-height',
background-origin', border-width', min-width',
background-position', border', outline-color',
background-repeat', font-family', outline-style',
background-size', font-size', outline-width',
background', caption-side', outline',
border-bottom-color', clear', overflow-x',
border-bottom-left-radius', color', overflow-y',
border-bottom-right-radius', direction', overflow',
border-bottom-style', display', padding-bottom',
border-bottom-width', empty-cells', padding-left',
border-bottom', float', padding-right',
border-collapse', font-stretch', padding-top',
border-color', font-style', padding',
border-left-color', font-variant', quotes',
border-left-style', font-weight', table-layout',
border-left-width', font', text-align',
border-left', letter-spacing', text-decoration',
border-radius', line-height', text-indent',
border-right-color', list-style-image', text-overflow',
border-right-style', list-style-position', text-transform',
border-right-width', list-style-type', vertical-align',
border-right', list-style', white-space',
border-spacing', margin-bottom', width',
border-style', margin-left', word-break',
border-top-color', margin-right', word-spacing',
border-top-left-radius', margin-top', word-wrap',

Supported markup languages:

  • HTML

Unsupported markup languages:

  • No Javascript (inline or linked .js files)
  • No Stylesheets (style attribute in tags is allowed)
  • No Flash, HTML5, Audio, iFrames or animated images (including animated GIFs)

How to check for stylesheets

First, you'll need to open the original index.html file. To find this file, see how to navigate your zip file.

  1. Check the index.html file to see if it contains <style> tags. For example, <style type="text/CSS">. Anything within the <style> and </style> tags will be removed when the HTML is validated.
  2. Check to see if there are any <link> tags. For example, <link href="CSS/example.CSS" rel="stylesheet">. Anything within the <link> and </link> tags will be removed when the HTML is validated.

To fix this, you can move the CSS inline. There are many tools available online that will do this automatically.

How to check for JavaScript

When you open the original index.html file, look to see if it contains <script> tags. For example, <script type="text/javascript">. Anything within the <script>and </script> tags will be removed when the HTML is validated. Gmail ads don't support JavaScript at this time.

Issues with ad appearance

Sometimes the ad looks different after uploading it and validating the HTML. One of the most common reasons that the ad looks different after upload is because the index.html file contains stylesheets or JavaScript.

Gmail, for security reasons, only renders HTML and CSS that are known to be safe. If the ad looks different after uploading it such as gaps between images or other unusual formatting, then it's most likely using some markup that Gmail does not support.

Alignment

When the html is uploaded, CSS that is not supported in Gmail is stripped from the ad. This may result in alignment changes, and the ad may look different than when previewing the HTML in your browser. It's best to use tables for structuring layout (<table>) and avoid CSS positioning.

White Spaces

First, check to make sure your browser is set to 100% zoom as this can cause white spaces to appear between images.

If your ads still include unnecessary whitespace, add style="display:block;" to all of your images.

JavaScript is not supported

This error means the code used in your index.html file isn't supported by Gmail ads. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

Supported markup languages

  • HTML

Unsupported markup languages

  • No Javascript (inline or linked .js files)
  • No Stylesheets (style attribute in tags is allowed)
  • No Flash, HTML5, Audio, iFrames or animated images (including animated GIFs)

How to check for JavaScript

When you open the original index.html file, look to see if it contains <script> tags. For example, <script type="text/javascript">. Anything within the =<script>and </script> tags will be removed when the HTML is validated. Gmail ads don't support JavaScript at this time.

Issues with ad appearance

Sometimes the ad looks different after uploading it and validating the HTML. One of the most common reasons that the ad looks different after upload is because the index.html file contains stylesheets or JavaScript.

Gmail, for security reasons, only renders HTML and CSS that are known to be safe. If the ad looks different after uploading it such as gaps between images or other unusual formatting, then it's most likely using some markup that Gmail does not support.

Alignment

When the html is uploaded, CSS that is not supported in Gmail is stripped from the ad. This may result in alignment changes, and the ad may look different than when previewing the HTML in your browser. It's best to use tables for structuring layout (<table>) and avoid CSS positioning.

White Spaces

First, check to make sure your browser is set to 100% zoom as this can cause white spaces to appear between images.

If your ads still include unnecessary whitespace, add style="display:block;" to all of your images.

External stylesheets (<style/> tag) are not supported

This error means the code used in your index.html file isn't supported by Gmail ads. To check this, you’ll need to open the index.html file in your zip file. It should be inside of your compressed HTML zip file. For steps to find your files, see how to navigate your zip file.

Supported markup languages:

  • HTML

Unsupported markup languages:

  • No Javascript (inline or linked .js files)
  • No Stylesheets (style attribute of tags is okay though)
  • No Flash, HTML5, Audio, iFrames or animated images (including animated GIFs)

How to check for stylesheets

First, you'll need to open the original index.html file. To find this file, see how to navigate your zip file.

  1. Check the index.html file to see if it contains <style> tags. For example, <style type="text/CSS">. Anything within the <style> and </style> tags will be removed when the HTML is validated.

Issues with ad appearance

Sometimes the ad looks different after uploading it and validating the HTML. One of the most common reasons that the ad looks different after upload is because the index.html file contains stylesheets or JavaScript.

Gmail, for security reasons, only renders HTML and CSS that are known to be safe. If the ad looks different after uploading it such as gaps between images or other unusual formatting, then it's most likely using some markup that Gmail does not support.

Alignment

When the html is uploaded, CSS that is not supported in Gmail is stripped from the ad. This may result in alignment changes, and the ad may look different than when previewing the HTML in your browser. It's best to use tables for structuring layout (<table>) and avoid CSS positioning.

White Spaces

First, check to make sure your browser is set to 100% zoom as this can cause white spaces to appear between images.

If your ads still include unnecessary whitespace, add style="display:block;" to all of your images.

Was this article helpful?
How can we improve it?
Sign in to AdWords

Get account-specific help and tips by signing in with your AdWords account email address, or learn how to get started with AdWords.