Skip to content

HTML4 or HMLT5 in 2023?

Daisho Komiyama edited this page Apr 30, 2023 · 3 revisions

According to caniemail.com, most major email clients now support HTML5 as of 2023, with the exception of Outlook on Windows machines. Therefore, I guess, we still need to use attributes for Vector Markup Language (VML) in 2023.

Back in 2019, a developer at Litmus was using the HTML5 doctype, but it's difficult to say with absolute certainty whether it works fine with Outlook on Windows.

You can check out the HTML email doctype he used on this GitHub repository: https://github.com/rodriguezcommaj/frontendmasters/tree/master/Code%20Examples.

It's as simple as this.

<!-- is this safe in 2023??? -->
<!DOCTYPE html>
<html lang="en">

Additionally, many HTML emails still contain the xmlns:v and xmlns:o attributes in their html tags today.

<html
    lang="en"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
>

The xmlns:v and xmlns:o attributes are used for legacy support of Microsoft Office specific elements in HTML emails. They are not required for most modern email clients and can be safely omitted in most cases.

The xmlns:v attribute is used to define the urn:schemas-microsoft-com:vml namespace, which is used to support legacy Vector Markup Language (VML) graphics in Microsoft Office documents. This attribute is only necessary if your email contains VML elements.

The xmlns:o attribute is used to define the urn:schemas-microsoft-com:office:office namespace, which is used to support legacy Microsoft Office-specific elements like o:p, which represents a paragraph mark. This attribute is only necessary if your email contains Office-specific elements.

Clone this wiki locally