This document aims to address several principles you can apply to code HTML emails. Each guideline is objectively vindicated to comply with modern email clients and with graceful degradation in mind for others. This is a living document and new ideas are more than welcome. Feel free to contribute. HTML5 doctype
The HTML5 doctype is clean, short and easy to remember. It's used by a vast majority of email clients, so your code will inherit it anyway. Just be aware that some other email clients might use other doctypes and your email might end up being rendered in Quirks Mode.
< html >
< head > head >
< body > body >
html >
See also:
Which doctype should you use in HTML emails? Lang
Defining the lang of the HTML content helps assistive technologies like screen readers to pick the right voice to read the content. The lang attribute needs to be defined with a valid language tag on the opening tag. But because some email clients (especially webmails) remove the element, the lang attribute also needs to be set on a wrapping element within the
.
Html coding email link
But I think first and foremost about:
Layout. An email without \n