# What Are HTML Email Doctypes & Which One Should You Use?

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "headline": "What Are HTML Email Doctypes & Which One Should You Use?",
  "description": "This article explores the different HTML email doctypes for creating interactive emails and email templates and the ones you should use for your emails.",
  "image": "https://res.cloudinary.com/mailmodo/image/upload/v1691510045/strapi/HTML_email_doctype_guide_9ef749b17a.png",
  "datePublished": "2023-07-27T16:55:27.072Z",
  "dateModified": "2025-02-28T11:06:50.744Z",
  "publisher": {
    "@type": "Organization",
    "name": "Mailmodo",
    "url": "https://www.mailmodo.com/",
    "sameAs": [
      "https://www.linkedin.com/company/mailmodo/",
      "https://www.facebook.com/mailmodo/",
      "https://www.instagram.com/mailmodohq/",
      "https://www.youtube.com/@mailmodo"
    ],
    "logo": "https://www.mailmodo.com/static/images/logo/logo-full.svg",
    "description": "Mailmodo is a complete email marketing platform that helps email marketers to create and send interactive emails to drive growth and engagement.",
    "address": {
      "@type": "PostalAddress",
      "addressLocality": "Lewes",
      "addressRegion": "DE",
      "postalCode": "19958",
      "streetAddress": "Mailmodo Technologies Inc. 16192, Coastal Highway",
      "addressCountry": {
        "@type": "Country",
        "name": "US"
      }
    },
    "contactPoint": {
      "@type": "ContactPoint",
      "email": "enquiries@mailmodo.com",
      "contactType": "customer service"
    }
  }
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "What Are HTML Email Doctypes & Which One Should You Use?",
  "description": "This article explores the different HTML email doctypes for creating interactive emails and email templates and the ones you should use for your emails.",
  "image": "https://res.cloudinary.com/mailmodo/image/upload/v1691510045/strapi/HTML_email_doctype_guide_9ef749b17a.png",
  "datePublished": "2023-07-27T16:55:27.072Z",
  "dateModified": "2025-02-28T11:06:50.744Z",
  "author": {
    "@type": "Person",
    "name": "Apurv Gupta",
    "url": "https://www.mailmodo.com/guides/author/apurv-gupta/"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Mailmodo",
    "logo": {
      "@type": "ImageObject",
      "url": "https://www.mailmodo.com/static/images/logo/logo-full.svg"
    }
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://www.mailmodo.com/guides/html-email-doctype/"
  }
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "@id": "#creator",
  "description": "Email marketing software to create and send interactive emails to maximize conversions and reinvent your user journey",
  "email": "support@mailmodo.com",
  "image": "https://www.mailmodo.com/static/images/og-image.png",
  "knowsAbout": "Email marketing",
  "legalName": "Mailmodo Technologies Inc.",
  "location": "United States",
  "logo": "https://www.mailmodo.com/static/images/logo/logo-full.svg",
  "name": "Mailmodo",
  "sameAs": [
    "https://twitter.com/mailmodo",
    "https://www.facebook.com/company/mailmodo/",
    "https://www.linkedin.com/company/mailmodo/"
  ],
  "url": "https://www.mailmodo.com/"
}
</script>

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://www.mailmodo.com/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Guides",
      "item": "https://www.mailmodo.com/guides/"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "html email doctype",
      "item": "https://www.mailmodo.com/guides/html-email-doctype/"
    }
  ]
}
</script>

## Table of contents

- What is HTML email doctype?
- What is a doctype and why should you use it?
- Types of HTML doctypes
- Which HTML doctype should you use for your emails?
- Final takeaway

Interactive emails are all the buzz in the digital marketing world nowadays. They give your recipients an app-like experience and give you a much better conversion and engagement rate. HTML is the building block for these engaging and visually appealing interactive emails.

  

You may have also encountered emails with alignment or rendering issues, resulting in a bad experience. One of the reasons behind this could be the **HTML email doctype**. This article explores the various HTML doctypes available and the one you should choose for your HTML interactive emails.

## What is HTML email doctype?

An HTML email doctype tells a web client or email client what version of HTML your email uses. This helps the email client render your [HTML email](https://www.mailmodo.com/guides/html-email-design/) the way it was intended to.

  

Technically, it is a null element and doesn’t contain any content within it. There are a few types of HTML email doctypes available today, and we’ll explore them later in this article.

## What is a doctype and why should you use it?

A doctype or document type declaration (DTD) is an instruction to the web client about the version of markup language your document or web page is written in. The doctype declaration appears in the first line of the HTML code of your email.

  

The use of doctype declaration is emphasized because it guarantees proper rendering of your HTML email or web page, which is known as the standards mode.

  

In the absence of a doctype declaration, there is a possibility that the email client may not render the HTML email or web page properly and open it in quirks mode, which is an incorrect rendering of your email or web page, resulting in it looking messy and unformatted.

  

<div class="highlight-gray">

  

<p> <strong>💡 Related guide:</strong> <a href="https://www.mailmodo.com/guides/email-format/">Email Format: Tips, Best Practices, and 7 Examples to Follow</a></p>

  

</div>

  

Now, take a look at the major clients that support HTML doctype declaration.

|Email client|Supports doctype?|
|--|--|
|Gmail|Only accepts HTML5 doctype. Automatically renders any doctype as HTML5|
|Apple Mail|YES|
|Microsoft Outlook (Windows Mail, MacOS, Outlook.com, iOS 2021-11, Android 2021-11)|YES|
|Microsoft Outlook (iOS 2019-07, Android 2019-07)|Buggy. Renders as with no doctype or as HTML5|
|Microsoft Outlook (Windows 2007-2019)|NO|
|Yahoo Mail (iOS, Desktop)|YES|
|Yahoo Mail (Android)|NO|
|AOL (iOS, Desktop)|YES|
|AOL (Android)|NO|





## Types of HTML doctypes

Returning to the different types of HTML doctypes, there are four. Take a look at them one by one and what the code looks like.

### 1. HTML5
    

HTML5 is the latest markup language version used for creating web pages and emails. It is an all-in-one option to code [email templates](https://www.mailmodo.com/email-templates/). It allows the use of apps, music and animations. Many email clients even force HTML5 for rendering emails.

  

This is what the code looks like:


```
<!DOCTYPE html> 
```

Next up on the list is **HTML 4.01**. It has three different types of declarations.

### 2. HTML 4.01 Strict
    

HTML 4.01 Strict contains all the HTML elements but doesn’t allow deprecated elements, presentational elements (< font >, < center >, etc.) or framesets.

  

This is what the code looks like:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

### 3. HTML 4.01 Transitional
    

HTML 4.01 Transitional contains neither all HTML elements nor includes framesets, but it includes presentational and deprecated elements.

This is what the code looks like:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


### 4. HTML 4.01 Frameset
    

HTML 4.01 Frameset allows for using of framesets too.

  

This is what the code looks like:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

You may even come across **XHTML doctypes** besides the four HTML doctypes. XHTML doctypes help interpret bad markups and require using body tags like < head >, < body >, etc., which aren’t necessary for HTML doctypes. There are 4 types of XHTML doctypes as well.


>For our email marketing campaigns, we use the XHTML 1.0 Transitional doctype. This doctype works best for us because it can identify bad markup. To eliminate poor HTML and avoid the use of framesets, this works great. This doctype comes with presentational elements, which makes it easier for us to use interactive emails for the purpose of marketing. We’ve had no issues so far with this doctype and plan on using it in the future as well. <br>
> -[Perry Zheng](https://www.linkedin.com/in/perryzheng/), CEO, [Cash Flow Portal](https://www.cashflowportal.com/)

### 5. XHTML 1.0 Strict
    

XHTML 1.0 Strict contains all HTML elements but does not allow for presentational elements, deprecated elements or framesets.

  

This is what the code looks like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


  

### 6. XHTML 1.0 Transitional
    

XHTML 1.0 Transitional contains all HTML elements and allows for presentational and deprecated elements but doesn’t allow for the use of framesets.

  

This is what their code looks like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


  

### 7. XHTML 1.0 Frameset
    

XHTML 1.0 Frameset contains all HTML elements, allows for presentational and deprecated elements and also for the use of framesets.

  

This is what the code looks like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

  

### 8. XHTML 1.1
    

XHTML 1.1 is the same as XHTML 1.0 with the addition of allowing to add extra modules.

  

This is what the code looks like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


## Which HTML doctype should you use for your emails?

The main factor behind you choosing the right doctype should ideally be what kind of email you’re sending. HTML5 is the newest version and should work for you in most cases.

  

Some developers also recommend XHTML 1.0 Transitional and HTML 4.01 Transitional doctype declarations.

  

In the end, you shouldn’t rely too heavily on the possibility of your email being compatible with a particular doctype. A failsafe would be to validate your email through [W3C Validator](https://validator.w3.org/) to identify any issues with your markup.

>My go-to doctype for creating interactive HTML emails is HTML5. It's the newest iteration of HTML, and it's broadly supported across numerous email clients, making it a dependable option. <br>
>The HTML5 doctype is simple and clean, starting with a straightforward. This makes it user-friendly and easy to apply. What's more, HTML5 is particularly versatile and provides superior support for incorporating multimedia content - a vital feature when crafting interactive emails. <br>
> -[Sudhir Khatwani](https://www.linkedin.com/in/sudhir-khatwani/), CEO, [The Money Mongers](https://themoneymongers.com/)
  

<div class="highlight-gray">

  

<p> <strong>💡 Related guide:</strong> <a href="https://www.mailmodo.com/guides/html-emails/">How to Create And Send HTML Email & Templates in 2023</a></p>

  

</div>

## Final takeaway

The various HTML email doctypes will help better rendering of your engaging, [interactive emails](https://www.mailmodo.com/guides/interactive-emails/) on various devices and email clients. It is to be noted though, that interactive/AMP email only support HTML5 doctype. Moreover, if you find using HTML to create your interactive emails difficult, you can even check out [AMP emails](https://www.mailmodo.com/guides/amp-for-email/). Mailmodo is an all-in-one email marketing platform that allows you to create interactive emails using its intuitive drag-and-drop editor without having to code.

## Frequently Asked Questions

### What is doctype?

Doctype is document type declaration (DTD), which is the instruction about the markup language used in writing the email or web page code.

### Do HTML emails need a doctype?

It is not a compulsion for emails to have a doctype, but it gives way to the possibility of the HTML email being rendered in quirks mode by the email client, which is improper rendering and formatting of your HTML email.

### How to declare an HTML doctype for my email?

The doctype declaration needs to be inserted in the first line of the HTML code of your email. For HTML 5 doctype, the code is <! DOCTYPE html>. This code is different for different doctypes.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is doctype?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Doctype is document type declaration (DTD), which is the instruction about the markup language used in writing the email or web page code."
      }
    },
    {
      "@type": "Question",
      "name": "Do HTML emails need a doctype?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "It is not a compulsion for emails to have a doctype, but it gives way to the possibility of the HTML email being rendered in quirks mode by the email client, which is improper rendering and formatting of your HTML email."
      }
    },
    {
      "@type": "Question",
      "name": "How to declare an HTML doctype for my email?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "The doctype declaration needs to be inserted in the first line of the HTML code of your email. For HTML 5 doctype, the code is <! DOCTYPE html>. This code is different for different doctypes."
      }
    }
  ]
}
</script>

---

**Author: Apurv Gupta**

Apurv Gupta, Co-Founder of Mailmodo, is a technologist and entrepreneur with expertise in interactive email marketing, SaaS, and software development.

