Member-only story

Five Tips for Writing HTML and CSS for Your Emails

A collection of useful suggestions on how to develop your emails considering the limitations of different mail clients

4 min readOct 8, 2024

--

When developing for different browsers, each one may have different support for CSS and HTML features. Similarly, different email clients have their own limitations that can affect the format and structure of your emails.

Ensuring that your design works consistently across different email platforms, especially popular ones like Gmail and Outlook, is critical to providing a seamless experience for all clients.

In this article, we will cover five basic guidelines for custom email design and highlight the most common issues to avoid.

Image by Ron Hoekstra from Pixabay

1. Use only inline CSS

Some clients like Gmail block any external imports for CSS stylesheets and they don’t even accept style tags inside the head or body. To be compatible with most mail clients, use only inline CSS with style directly set on the tags.

Also, not all features of CSS are available so try to use only the most common and simple ones avoiding recent additions or less common features.

--

--

Francesco Pastore
Francesco Pastore

Written by Francesco Pastore

An engineering student in Milan and a web developer for an IT company. Write about programming and cybersecurity topics.

No responses yet