This article mainly introduces the use of HTML to write simple email templates. The author advocates minimalism... You can first look at the finished template introduced in the link at the end of the article. Friends who need it can refer to it.
Today, I want to write a low-tech problem.
By the way, I have subscribed to a lot of news emails (Newsletter), such as JavaScript Weekly. Receive an email every week to learn about the big events of the week.
One day, I was wondering, can I also make such an email?
Then, I found that this was not that easy. Putting aside the background and editing work, it takes a lot of thought to design an email template just by designing it.
Because this formatted email is actually a web page, the official name is HTML Email. Whether it can be displayed properly depends entirely on the email client. Most email clients (such as Outlook and Gmail) filter HTML settings to make emails unrecognizable.
I found that the trick to writing HTML email is to use the web page production method 15 years ago. Below is my compilation guide.
1. DoctypeCurrently, the best compatibility Doctype is XHTML 1.0 Strict. In fact, Gmail and Hotmail will delete your Doctype and replace it with this Doctype.
XML/HTML Code Copy content to clipboard