hich doctype should you use?
Now that we know more about HTML email doctypes, which one should you use? Well, this one’s a bit tricky to answer because it depends, in part, on your subscriber’s email client. Some email clients don’t offer support for certain doctypes. Others strip it away altogether. In this section, we’ll go over the different doctypes, and in the next section, we’ll discuss the email client support for doctypes.
Besides email client support, you need to consider the various . Here’s a list of some recommended doctypes:
- HTML 5
- HTML 4.01: Strict, Transitional, or Frameset
- XHTML 1.0 Transitional
Let’s dive into each of these below.
What’s the HTML5 doctype?
We recommend using the HTML5 doctype if your HTML email template is coded in HTML5. In fact, we recommend you that you use the HTML5 doctype in general. The HTML5 doctype declaration is as follows:
If you check out the code inside HTML emails you may seem some other stuff in the
<html> tag before the <head> begins. This snippet provides some additional information to clients on how to render your code. That includes the language and schema that helps make things work in problematic Outlook inboxes.
HTML5 has wide support across email clients. In fact, Gmail only supports Senegal Business Email List HTML5 doctype declarations and will render all of your emails, regardless of doctype declarations, with HTML5. However, sometimes the HTML5 doctype adds an extra space under your images. You can correct spacing issues by adding a display block to your image, as shown in the example code below:
What are the HTML 4.01 doctypes?
We recommend that you use one of the following HTML 4.01 doctypes if your HTML email UAE Cell Number template is coded in HTML 4.01. However, note that HTML 4.01 isn’t used much, and may not be supported (or get switched) in email clients like Gmail.