How to Insert HTML Into Gmail

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
You can insert HTML into Gmail.
Image Credit: Marko Geber/DigitalVision/GettyImages

Older versions of Gmail allowed HTML and even supplied an HTML editor for easy use. Now, Gmail makes it more difficult to use HTML and places restrictions on what HTML is actually supported. That said, implementing basic HTML to help customize and design emails is simple to implement and it can make for some really nice design elements without paying for a custom email service.

Advertisement

HTML Limitations in Gmail

Video of the Day

Gmail allows for simple formatting in a WYSIWYG editor but you can also use an external editor for more complex code. External editors are ideal for creating company branding and newsletter style formatting while the internal editor is great for simple fonts, emojis and images. The editor choice essentially depends on the complexity of the HTML and the specific needs for the actual email.

Advertisement

Video of the Day

Web fonts also will not function within the Gmail ecosystem. You can only use the fonts already supplied by Gmail, so avoid adding anything beyond these because the code will not render the custom fonts. The fonts that are supplied by Gmail, however, are fairly robust and there are plenty of options for a customized email.

Advertisement

Another limitation is the inability to incorporate external style sheets. You simply cannot write an independent CSS sheet and plug it directly into Gmail. Luckily, you can add specific lines of CSS code as an embedded element within the HTML code. This offers a nice workaround with limited styling abilities but not the full power of a Cascading Style Sheet.

Advertisement

Use HTML in Gmail

Now that you know the limitations, go ahead and write the HTML code in the internal editor or an external editor. External editors are common and are often integrated with mail list subscription management services. Free and paid versions exist with a wide variety of options available. The internal editor will require writing or copy and pasting the raw code from a plain text editor to function properly.

Advertisement

External editors are ideal for many users because writing the raw code is not always a necessity. Many versions come with pre-designed templates and a drag and drop editor that requires no knowledge of coding. The designs are made specifically to function within the limitations of email platforms like Gmail.

Advertisement

Advertisement

The biggest hurdle to inserting custom HTML code into Gmail is the display. Emails are read on a variety of different devices and the code will display differently across each device. It may work perfectly on a laptop and fail to adjust the layout for mobile devices. Look for external editing platforms that offer responsive template designs to ensure they will resize properly on any device.

Advertisement

Render the Code

After designing the email, it's time to enter the code into Gmail directly. Testing before sending is also a critical final step in the process. A full service email editor and management system will connect with your Gmail and send the emails through the external service. These editors typically offer an easy method of sending a test email as well to view everything in your normal inbox.

Advertisement

To embed HTML in an email in Gmail, copy the code in a plain text format and render the code in a web browser first. Opening the HTML file in Chrome or another browser is just fine. This will display the email as it will appear in Gmail. Copy everything from the web browser display and paste directly into Gmail.

Advertisement

Send a test email to yourself to ensure it displays properly before sending the official email. Google also offers the Gmass extension to manage and send bulk emails to your official email list.

Advertisement

Advertisement

references