# HTML Email Design and Coding Guide (2026) | MailCraft Studio

> Table layouts, inline CSS, responsive email, images, dark mode and Outlook compatibility: the 2026 guide to coding HTML email.

Source: https://mailcraftstudio.com/en/guide

# The 2026 HTML Email Design and Coding Guide

This guide is for developers, designers and marketers who want to build modern HTML email templates. Email is still one of the most effective channels a brand has, but coding for it follows its own rules, limits and quirks that are very different from regular web development. MailCraft Studio exists to make that work easier.

## Part 1: Getting Started with HTML Email

Building an email is very different from building a website. Browsers such as Chrome, Safari and Firefox support modern standards (HTML5, CSS3) well, while email clients such as Outlook, Gmail, Yahoo and Apple Mail use older and inconsistent rendering engines. Some desktop versions of Microsoft Outlook, for example, render HTML with the Microsoft Word engine, which surprises most web developers.

A template has to look right not only on the newest iPhone but also in Outlook 2013 on a ten-year-old Windows PC. That is where defensive coding comes in: assume the worst case and write code that survives it.

### Why HTML email?

Plain-text email is great for personal messages but falls short for brands. HTML email gives you:

-   **Brand identity:** your logo, colors and typefaces.
-   **Visual hierarchy:** headings, buttons (CTAs) and images that guide the reader.
-   **Measurability:** open and click rates you can track.
-   **Higher conversion:** a well-designed "Buy now" button gets far more clicks than a plain text link.

## Part 2: Why Tables Still Matter

On the web we are used to `div`, `flexbox` and `grid`. In email, the `table` element is still king. Layout techniques from the 1990s are the foundation of email coding.

The reason is that clients like Outlook do not handle `div`\-based layouts or `float` reliably. Tables are the safest and most consistent way to align and structure content.

### Basic table structure

A template usually starts with one main container table, typically 600px to 800px wide. Why 600px? Because that is the width of the reading pane in most desktop email clients.

```
<table role="presentation" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center">
      <!-- Content goes here -->
    </td>
  </tr>
</table>
```

The `role="presentation"` attribute matters: it tells screen readers that the table is for layout, not data, which improves accessibility.

### Ghost tables

A technique specifically for Outlook. With `mso` (Microsoft Office) conditional comments you can add tables that only Outlook sees, so modern clients get your `div` layout while Outlook keeps its structure.

## Part 3: CSS and Email Clients

CSS support varies widely between clients. Gmail now supports <style> blocks, but inline CSS is still the safest approach.

### What is inline CSS?

Instead of keeping styles in a separate `.css` file or a <style> block, you write them directly in each element's `style` attribute.

Example:

```
<p style="font-family: Arial, sans-serif; font-size: 16px; color: #333333; line-height: 1.5;">Hello world</p>
```

MailCraft Studio does not move styles inline for you, so write critical styles straight into the `style` attribute and check the result in the previews of different clients.

### CSS features to avoid

These are risky or not supported at all:

-   `position: absolute / fixed` (almost never supported)
-   `float` (not supported by Outlook)
-   `display: flex` (Gmail supports it, older Outlook versions do not)
-   `video` and `audio` elements (very limited support)
-   `javascript` (blocked entirely for security reasons)

## Part 4: Responsive Email Design

More than half of all email is read on mobile devices, so templates have to work flawlessly on small screens. There are two main approaches:

### 1\. Fluid design

Give boxes percentage widths so content narrows as the screen gets smaller.

### 2\. Media queries

Use `@media` queries in a <style> block to define styles for specific widths (for example 480px): larger text on mobile, full-width buttons, or collapsing multi-column layouts into one column.

```
@media only screen and (max-width: 600px) {
  .mobile-full-width {
    width: 100% !important;
  }
  .mobile-hide {
    display: none !important;
  }
}
```

MailCraft Studio's live preview shows your responsive changes immediately, including on iPhone, Pixel and Galaxy device frames.

## Part 5: Images and Media

Images need care in email. Many clients, especially corporate Outlook installs, block images by default; they stay hidden until the reader chooses to download them.

### Alt text

Give every image a descriptive `alt` text. Readers see it when the image does not load, and screen-reader users depend on it.

Example: `<img src="logo.png" alt="Company logo" />`

### Retina screens

To keep logos and icons sharp on high-resolution screens, export them at twice the size and halve the dimensions in HTML. For a 200×200 logo, the image file should be 400×400 pixels.

## Part 6: Professional Templates with MailCraft Studio

Dealing with all of these details is hard work. MailCraft Studio is a free, browser-based editor that takes care of the tedious parts.

### Key features

-   **Live preview:** write code on the left and see the result on the right instantly, in Gmail, Outlook, Apple Mail, Yahoo, Yandex and Samsung Mail views.
-   **Ready for your backend:** when the design is done, copy it as a C# or Node.js string in one click. Plugging in dynamic values such as user names or order numbers becomes trivial.
-   **Privacy first:** your templates are not sent to any server. They stay in your browser's local storage.
-   **Themes:** light, dark and system themes, plus a light/dark switch for the preview.

### How to use it

1.  Open the editor on the home page.
2.  Paste an existing HTML template or start from scratch.
3.  Check mobile and desktop views with the client picker in the Preview panel.
4.  In the BE output panel, choose C# or Node.js and use Minify if you need compact output.
5.  Copy the code into the email-sending function of your C# or Node.js project.

## Part 7: FAQ and Tips

### Q: Can I embed video?

A: Native video (`<video>`) support is very limited. The best approach is to use a frame from the video with a play button on top, linked to the video on YouTube or Vimeo.

### Q: Can I use custom fonts?

A: You can use web fonts such as Google Fonts, but some clients like Outlook ignore them and fall back to a default (Times New Roman or Arial). Always specify a fallback stack, for example `font-family: 'Open Sans', Arial, sans-serif;`

### Q: How do I support dark mode?

A: Use the `@media (prefers-color-scheme: dark)` query to write dark-mode rules. Also make sure images, especially logos, work on both light and dark backgrounds, for example with a transparent PNG and a subtle light outline.

Email design takes patience and attention to detail. MailCraft Studio helps you move faster and ship professional results. Happy building!

### Free HTML Email Template Editor

MailCraft Studio is a free **HTML email editor** and **email template builder** focused on responsive email design, whatever your level of coding experience.

Its C# email template output makes it a practical tool for .NET developers, and the Node.js template output does the same for JavaScript projects. It is lightweight, fast and needs no installation.

The most important thing in HTML email is client compatibility. Outlook, Gmail, Yahoo Mail, Apple Mail and others render differently, so test across clients. MailCraft Studio's previews and clean output help you get there.

It is code-based rather than drag-and-drop, which gives you more control, while the live preview keeps the work visual. It suits newsletters and transactional email alike: invoices, password resets, welcome messages and more.

The success of your email campaigns depends on template quality. Broken links, missing images and shifted layouts hurt your brand. A dedicated email coding tool keeps those risks down, and the format and minify options in the backend output get your code ready for your project.

In short, MailCraft Studio is a modern, fast, private and developer-friendly _HTML email template editor_.
