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

ByMashkoor Alam


Linkedin logo
Twitter logo
copy link
Facebook logo
Whatsapp logo
Pinterest logo
mail logo

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.

Table of contents

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 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.

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,, 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. 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:


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" "">

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" "">

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.
-Perry Zheng, CEO, Cash Flow Portal

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" "">

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" "">

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" "">

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" "">

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 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.
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.
-Sudhir Khatwani, CEO, The Money Mongers


The various HTML email doctypes will help better rendering of your engaging, 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. 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.

What you should do next

Hey there, thanks for reading till the end. Here are 3 ways we can help you grow your business:

  1. Talk to an email expert. Need someone to take your email marketing to the next level? Mailmodo’s experts are here for you. Schedule a 30-minute email consultation. Don’t worry, it’s on the house. Book a meet here.

  2. Send emails that bring higher conversions. Mailmodo is an ESP that helps you to create and send app-like interactive emails with forms, carts, calendars, games, and other widgets for higher conversions. Get started for free.

  3. Check out our AI prompts library. If you need AI prompts for ChatGPT or Bing, here's a ready-made database we’ve built to help marketers succeed at prompt engineering. Get your AI prompts here.

  4. Get smarter with our email resources. Explore all our knowledge base here and learn about email marketing, marketing strategies, best practices, growth hacks, case studies, templates, and more. Access guides here.

Frequently asked questions

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

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.

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.

What should you do next?

Thanks for reading till the end. Here are 3 ways we can help you grow your business:


Get smarter with our email resources

Explore our email marketing guides, ebooks and other resources to master email marketing.


Do better email marketing with Mailmodo

Send app-like interactive emails with forms, carts, calendars, games, etc. to boost email ROI.


Talk to an email expert

Get a 30-min. free email consultation with a Mailmodo expert to optimize your email marketing.

Was this post useful?

Get 3X conversions
with interactive emails


Create & send interactive emails without coding


Put revenue on auto-pilot with pre-built journeys


Save time with AI-powered email content creation

1000+ businesses grew with Mailmodo, including