HTML email: Difference between revisions

Content deleted Content added
No edit summary
Tag: possible vandalism
m Adoption: Punctuation
 
(92 intermediate revisions by 66 users not shown)
Line 1:
{{Short description|Type of email}}
{{Use dmy dates|date=JanuaryDecember 20132022}}
'''HTML email''' is the use of a [[subset]] of [[HTML]] (often ill-defined) to provide formatting and [[semantic web|semantic]] markup capabilities in [[email]] that are not available with [[plain text]].
{{POV|talk=POV|date=December 2021}}
'''HTML mailemail''' allowsis the senderuse toof properly expressa [[block quote|quotationssubset]] (as inof [[PostingHTML]] style#Interleavedto style|inlineprovide replying]]),formatting headings,and [[Bulletsemantic (typography)web|bulleted listssemantic]], [[Emphasismarkup (typography)|emphasizedcapabilities text]],in [[subscriptemail]]s andthat [[superscript]]s,are andnot otheravailable visual andwith [[typographicplain text]]:<ref>{{Cite cuesweb|title to= improveText theEmail readabilityvs andHTML aestheticsEmail of theThe message,Pros asand wellCons as{{!}} semanticThunder informationMailer encoded withinMass theEmailing message,Software|url such as= http://www.thundermailer.com/text-email-vs-html-email-the-pros-and-cons/|website original= authorthundermailer.com|access-date and= Message2016-ID01-30}}</ref> ofText acan quote.be Longlinked without displaying a [[Uniform Resource Locator|URL]]s, canor bebreaking linked to without beinglong brokenURLs into multiple pieces,. and textText is wrapped to fit the width of the userviewing agent's viewportwindow, insteadrather ofthan uniformly breaking each line at 78 characters (defined in [https://tools.ietf.org/html/rfc5322 RFC 5322], which was necessary on older [[Data terminal#Text terminals|text terminals]]). It allows in-line inclusion of images, [[Table (information)|table]]s, as well as diagrams or [[mathematical formula]]e as images, which are otherwise difficult to convey (typically using [[ASCII art]]).
 
== Adoption ==
Most graphical [[email client]]s support HTML email, and many default to it.<ref>[http://www.expita.com/nomime.html#programs Configuring Mail Clients to Send Plain ASCII Text]{{dead link|date=November 2012}} — E-mail client programs</ref> Many of these clients include both a [[GUI]] editor for composing HTML emails and a rendering engine for displaying received HTML emails.
 
Most graphical [[email client]]s support HTML email, and many default to it.<ref>[http://www.expita.com/nomime.html#programs Configuring Mail Clients to Send Plain ASCII Text]{{dead link|date=November 2012}} — E-mail client programs</ref> Many of these clients include both a [[GUI]] editor for composing HTML emails and a rendering engine for displaying received HTML emails.
HTML mail allows the sender to properly express [[block quote|quotations]] (as in [[Posting style#Interleaved style|inline replying]]), headings, [[Bullet (typography)|bulleted lists]], [[Emphasis (typography)|emphasized text]], [[subscript]]s and [[superscript]]s, and other visual and [[typographic]] cues to improve the readability and aesthetics of the message, as well as semantic information encoded within the message, such as the original author and Message-ID of a quote. Long [[Uniform Resource Locator|URL]]s can be linked to without being broken into multiple pieces, and text is wrapped to fit the width of the user agent's viewport, instead of uniformly breaking each line at 78 characters (defined in RFC 5322, which was necessary on older [[Data terminal#Text terminals|text terminals]]). It allows in-line inclusion of [[Table (information)|table]]s, as well as diagrams or [[mathematical formula]]e as images, which are otherwise difficult to convey (typically using [[ASCII art]]).
 
Since its conception, a number of people have vocally opposed all HTML email (and even [[MIME]] itself), for a variety of reasons.<ref>[https://subversion.american.edu/aisaac/notes/htmlmail.htm HTML Email: Whenever Possible, Turn It Off!]</ref> For instance, the ''ASCII Ribbon Campaign'' advocated that all email should be sent in [[ASCII]] text format. Proponents placed [[ASCII art]] in their [[signature block]]s, meant to look like an [[awareness ribbon]], along with a message or link to an advocacy site. The campaign was unsuccessful and was abandoned in 2013.<ref>{{Cite web |title=The Ascii Ribbon Campaign official homepage |url=http://www.asciiribbon.org/ |access-date=30 January 2016 |archive-url=https://web.archive.org/web/20100311081242/http://www.asciiribbon.org/ |archive-date=11 March 2010 |url-status=dead }}</ref><ref>{{Cite web|title = Shutdown of the ASCII ribbon campaign – Pale Moon forum|url = http://forum.palemoon.org/viewtopic.php?f=4&t=2705|website = forum.palemoon.org|access-date = 2016-01-30|archive-url = https://web.archive.org/web/20160203102930/http://forum.palemoon.org/viewtopic.php?f=4&t=2705|archive-date = 3 February 2016|url-status = dead}}</ref>
== Adoption ==
 
Since its conception, a number of people have vocally opposed all HTML email (and even [[MIME]] itself), for a variety of reasons.<ref>[https://subversion.american.edu/aisaac/notes/htmlmail.htm HTML Email: Whenever Possible, Turn It Off!]</ref> The [[ASCII Ribbon Campaign]] is an internet phenomenon advocating that email should continue to be sent in Human Readable [[ASCII]] text format. While still considered inappropriate in many newsgroup postings and mailing lists, itsHTML adoption for personal and business mail has only increased over time. Some of those who strongly opposed it when it first came out now see it as mostly harmless.<ref>[http://birdhouse.org/blog/2006/01/15/html-email-the-poll/ HTML Email: The Poll] (Scot Hacker, originator of the much-linked-to ''Why HTML in E-Mail is a Bad Idea'' discusses how his feelings have changed since the 1990s)</ref>
 
According to surveys by [[online marketing]] companies, adoption of HTML-capable email clients is now nearly universal, with less than 3% reporting that they use text-only clients.<ref name="emaillabs statistics">{{citeCite web|title=Email Marketing Statistics and Metrics – EmailLabs |url=http://www.emaillabs.com/resourcestools/resources_statisticsemail-marketing-statistics.html |titledate=Email2007-03-29 Marketing|access-date=2016-01-30 Statistics|quote=HTML andhas Metricsnearly |publisher=Emaillabsuniversal adoption among consumers: A Jupiter Research consumer survey found just 3% receive only text email.com |dateurl-status=dead |accessdatearchiveurl=2012https://web.archive.org/web/20070329012457/http://www.emaillabs.com/tools/email-06marketing-24statistics.html |archivedate=29 March 2007 }}</ref> The Amajority smallerof number,users thoughprefer stillto thereceive majority, preferHTML itemails over plain text.<ref name="clickz data">{{citeCite web|url=http://www.clickz.com/showPage.html?pagetitle =1428551 |title=Real-World Email Client Usage: The Hard Data {{!}} ClickZ|publisherurl =Clickz https://www.clickz.com/clickz/column/2138714/real-world-email-client-usage-the-hard-data|website = clickz.com|access-date = 2016-01-30|accessdatelast =2012 Grossman|date = 2002-0607-2409|first = Edward|quote = Do you prefer receiving HTML or text email? HTML: 41.95%, Text: 31.52%, No preference: 26.53%}}</ref><ref>{{deadCite linkweb|title = The Science of Email Marketing|url = http://www.slideshare.net/HubSpot/the-science-of-email-marketng/32|website = slideshare.net|access-date =October 20112016-01-30|quote = In what format do you prefer to receive email messages from companies? HTML: 88%, Plain text: 12%}}</ref>
 
== Compatibility ==
Email software that complies with [https://tools.ietf.org/html/rfc2822 RFC 2822] is only required to support plain text, not HTML formatting. Sending HTML formatted emails can therefore lead to problems if the recipient's email client does not support it. In the worst case, the recipient will see the HTML code instead of the intended message.
{| class="wikitable" align=right width=50%
 
|+"Email standards project" ''Acid test'' comparison (as of January 2013)[http://www.email-standards.org/ ]
Among those email clients that do support HTML, some do not render it consistently with [[W3C]] specifications, and many HTML emails are not compliant either, which may cause rendering or delivery problems, especially for users of [[GMail]].
 
In particular, the <code><nowiki><head></nowiki></code> tag, which is used to house CSS style rules for an entire HTML document, is not well supported, sometimes stripped entirely, causing in-line style declarations to be the [[De facto standard|''de facto'' standard]], even though theyin-line style declarations are notinefficient optimaland fromfail ato [[Separationtake good advantage of styleHTML's andability content|semanticto web]] point[[Separation of view.<ref>{{citecontent web|url=http://www.yourtotalsite.com/archives/online_marketing/not_your_ordinary_html_em/Default.aspxand presentation|title=Notseparate yourstyle ordinaryfrom html email tips |publisher=Yourtotalsitecontent]].com |date= |accessdate=2012-06-24}}{{Dead link|url=http://web.archive.org/web/20070927043051/http://www.yourtotalsite.com/archives/online_marketing/not_your_ordinary_html_em/Default.aspxcitation needed|date=FebruaryJanuary 20092015}}</ref> Although workarounds have been developed,<ref>{{cite web|author=Dialect <http://dialect.ca/> |url=http://premailer.dialect.ca/ |title=Premailer: make CSS inline for HTML e-mail |publisher=Premailer.dialect.ca |date= |accessdate=2012-06-24}}</ref> this has caused no shortage of frustration among newsletter developers, spawning the [[grassroots]] [http://www.email-standards.org/ Email Standards Project], which grades email clients on their rendering of an acid[[Acid test]], inspired by those of the [[Web Standards Project]], and lobbies developers to improve their products.<ref>{{cite web|url=http://www.campaignmonitor.com/blog/archives/2007/09/why_we_need_web_standards_supp_1.html |title=Why we need standards support in HTML email |publisher=Campaign Monitor |date= |accessdate=2012-06-24}}</ref> To persuade [[Google]] to improve rendering in [[Gmail]], for instance, they published a video montage of grimacing web developers,<ref>{{cite web |url=http://www.email-standards.org/gmail-appeal |title=The 2008 Gmail Appeal &#124; Email Standards Project |publisher=Email-standards.org |date= |accessdate=2012-06-24 |url-status=dead |archiveurl=https://web.archive.org/web/20120515030536/http://www.email-standards.org/gmail-appeal |archivedate=15 May 2012 }}</ref> resulting in attention from an employee.
 
{| class="wikitable" align=right width=50%
|+"Email standards project" ''Acid test'' comparison (as of January 2013)<ref>{{Cite web |date= |title=Home |url=http://www.email-standards.org/ |archive-url=https://web.archive.org/web/20130114102435/http://www.email-standards.org/ |archive-date=2013-01-14 |access-date=2024-12-22 |website=Email Standards Project}}</ref>
|-
!Clients !! Result (as of)
Line 56 ⟶ 64:
|-
|[[Google Gmail]]
|{{nopartial|Improvement recommended (13 July 2011)}}
|-
|[[Lotus Notes]] 8
|{{nopartial|Improvement recommended (28 November 2007)}}
|-
|[[Microsoft Outlook]] 2007
|{{nopartial|Improvement recommended (28 November 2007)}}
|}
Email software that complies with RFC 2822 is only required to support plain text, not HTML formatting. Sending HTML formatted emails can therefore lead to problems if the recipient's email client does not support it. In the worst case, the recipient will see the HTML code instead of the intended message.
 
Among those email clients that do support HTML, some do not render it consistently with [[W3C]] specifications, and many HTML emails are not compliant either, which may cause rendering or delivery problems, especially for users of [[GMail]].
 
In particular, the <code><nowiki><head></nowiki></code> tag, which is used to house CSS style rules for an entire HTML document, is not well supported, sometimes stripped entirely, causing in-line style declarations to be the [[De facto standard|''de facto'' standard]], even though they are not optimal from a [[Separation of style and content|semantic web]] point of view.<ref>{{cite web|url=http://www.yourtotalsite.com/archives/online_marketing/not_your_ordinary_html_em/Default.aspx |title=Not your ordinary html email tips |publisher=Yourtotalsite.com |date= |accessdate=2012-06-24}}{{Dead link|url=http://web.archive.org/web/20070927043051/http://www.yourtotalsite.com/archives/online_marketing/not_your_ordinary_html_em/Default.aspx |date=February 2009}}</ref> Although workarounds have been developed,<ref>{{cite web|author=Dialect <http://dialect.ca/> |url=http://premailer.dialect.ca/ |title=Premailer: make CSS inline for HTML e-mail |publisher=Premailer.dialect.ca |date= |accessdate=2012-06-24}}</ref> this has caused no shortage of frustration among newsletter developers, spawning the [[grassroots]] [http://www.email-standards.org/ Email Standards Project], which grades email clients on their rendering of an acid test, inspired by those of the [[Web Standards Project]], and lobbies developers to improve their products.<ref>{{cite web|url=http://www.campaignmonitor.com/blog/archives/2007/09/why_we_need_web_standards_supp_1.html |title=Why we need standards support in HTML email |publisher=Campaign Monitor |date= |accessdate=2012-06-24}}</ref> To persuade [[Google]] to improve rendering in [[Gmail]], for instance, they published a video montage of grimacing web developers,<ref>{{cite web|url=http://www.email-standards.org/gmail-appeal |title=The 2008 Gmail Appeal &#124; Email Standards Project |publisher=Email-standards.org |date= |accessdate=2012-06-24}}</ref> resulting in attention from an employee.
 
== Style ==
 
Some senders may excessively rely upon large, colorful, or distracting [[font]]s, making messages more difficult to read.<ref>{{cite web |last=Shobe |first=Matt |url=http://www.burningdoor.com/matt/archives/000782.html |title=A pretty fair argument against HTML Email |publisher=Burningdoor.com |date=2004-10-12 |accessdate=2012-06-24 |url-status=dead |archiveurl=https://web.archive.org/web/20120424084806/http://www.burningdoor.com/matt/archives/000782.html |archivedate=24 April 2012 }}</ref> For those especially bothered by this formatting, some [[user agent]]s make it possible for the reader to partially override the formatting (for instance, [[Mozilla Thunderbird]] allows specifying a minimum font size); however, these capabilities are not globally available. Further, the difference in optical appearance between the sender and the reader can help to differentiate the author of each section, improving readability.
 
== Multi-part formats ==
 
Many email servers are configured to automatically generate a plain text version of a message and send it along with the HTML version, to ensure that it can be read even by text-only [[email client]]s, using the <code>[[MIME content type|Content-Type]]: [[MIME#Alternativealternative|multipart/alternative]]</code>, as specified in [https://tools.ietf.org/html/rfc1521 RFC 1521].<ref>[http://wwwtools.yahooietf.comorg/CIEhtml/RFC/1521/18rfc1521#section-7.htm2.3 RFC 1521 7.2.3. The Multipart/alternative subtype]{{dead link|date=June 2012}}</ref><ref>{{cite web|url=http://www.codestone.ltd.uk/software/docs/csmail/tn1010-11-2.pdf |title=TN1010-11-2: Multipart/Alternative Gracefully handling HTML-phobic email clients. |format=PDF |date= |accessdate=2012-06-24}}</ref><ref>{{cite web|url=http://www.wilsonweb.com/wmt5/html-email-multi.htm |title=Sending HTML and Plain Text E-Mail Simultaneously |publisher=Wilsonweb.com |date=2000-04-28 |accessdate=2012-06-24}}</ref> The message itself is of type <code>multipart/alternative</code>, and contains two parts, the first of type <code>text/plain</code>, which is read by text-only clients, and the second with <code>text/html</code>, which is read by HTML-capable clients. The plain text version may be missing important formatting information, however. (For example, ana mathematical equation may lose a superscript and take on an entirely new meaning.)
 
Many{{Citation needed|date=September 2009}} [[Electronic mailing list|mailing list]]s deliberately block HTML email, either stripping out the HTML part to just leave the plain text part or rejecting the entire message.{{Citation needed|date=September 2009}}
 
The order of the parts is significant. RFC1341 states that: ''In general, user agents that compose multipart/alternative entities should place the body parts in increasing order of preference, that is, with the preferred format last.''<ref>{{cite web|url=http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html|title=RFC1341 Section 7.2 The Multipart Content-Type|accessdate=2014-07-15}}</ref> For multipart emails with html and plain-text versions, that means listing the plain-text version first and the html version after it, otherwise the client may default to showing the plain-text version even though an html version is available.
 
== Message size ==
 
HTML email is larger than plain text. Even if no special formatting is used, there will be the overhead from the tags used in a minimal HTML document, and if formatting is heavily used it may be much higher. Multi-part messages, with duplicate copies of the same content in different formats, increase the size even further. The plain text section of a multi-part message can be retrieved by itself, though, using [[IMAP]]'s FETCH command.<ref>{{cite web|url=http://dsv.su.se/jpalme/ietf/mhtml-discussion.html |title=Do we really want to send web pages in e-mail? |publisher=Dsv.su.se |date= |accessdate=2012-06-24}}</ref>
 
Although the difference in download time between plain text and mixed message mail (which can be a factor of ten or more) was of concern in the 1990s (when most users were accessing email servers through slow [[modem]]s), on a modern connection the difference is negligible for most people, especially when compared to images, music files, or other common attachments.<ref>[http://momentumwww.insertdiscgeorgedillon.com/archivesweb/2004/09/17/html_email_still_evil_part_1html_email_is_evil_still.htmlshtml HTML Email Still Evil?]</ref>
 
Although the difference in download time between plain text and mixed message mail (which can be a factor of ten or more) was of concern in the 1990s (when most users were accessing email servers through slow [[modem]]s), on a modern connection the difference is negligible for most people, especially when compared to images, music files, or other common attachments.<ref>[http://momentum.insertdisc.com/archives/2004/09/17/html_email_still_evil_part_1.html HTML Email — Still Evil?]</ref>
gjtuytjgjhg uyujhggyh uuiui
== Security vulnerabilities ==
HTML allows for a link to havebe ahidden, differentbut targetshown thanas theany link'sarbitrary text, such as a user-friendly target name. This can be used in [[phishing]] attacks, in which users are fooled into believing thataccessing a linkcounterfeit pointsweb to the website of an authoritative source (such as a bank), visiting it,site and unintentionally revealing personal details (like bank account numbers) to a scammer.
 
If an email contains inline content from an external server, such as a [[Digital image|picture]],
HTML allows for a link to have a different target than the link's text. This can be used in [[phishing]] attacks, in which users are fooled into believing that a link points to the website of an authoritative source (such as a bank), visiting it, and unintentionally revealing personal details (like bank account numbers) to a scammer.
retrieving it requires a request to that external server which identifies where the picture will be displayed and other information about the recipient. [[Web bug]]s are specially created images (usually unique for each individual email) intended to track that email and let the creator know that the email has been opened. Among other things, that reveals that an email address is real, and can be targeted in the future.
 
Some phishing attacks rely on particular features of HTML:<ref name=Trend>{{cite web|title=Trend-spotting email techniques: How modern phishing emails hide in plain sight |date=August 18, 2021 |url=https://www.microsoft.com/en-us/security/blog/2021/08/18/trend-spotting-email-techniques-how-modern-phishing-emails-hide-in-plain-sight/ |publisher=Microsoft.com}}</ref>
If an email contains [[web bug]]s (inline content from an external server, such as a [[Digital image|picture]]), the server can alert a third party that the email has been opened. This is a potential [[email privacy|privacy]] risk, revealing that an email address is real (so that it can be targeted in the future) and revealing when the message was read. For this reason, some email clients do not load external images until requested to by the user.
* Brand impersonation with procedurally-generated graphics (such graphics can look like a trademarked image but evade security scanning because there is no file)
* Text containing invisible [[Unicode]] characters or with a zero-height font to confuse security scanning
* Victim-specific URI, where a malicious link encodes special information which allows a counterfeit site to be personalized (appearing as the victim's account) so as to be more convincing.
 
Displaying HTML content frequently involves the client program calling on special routines to parse and render the HTML-coded text; deliberately mis-coded content can then exploit mistakes in those routines to create security violations.{{cn|date=June 2024}} Requests for special fonts, etc, can also impact system resources.{{cn|date=June 2024}}
During periods of increased network threats, the US Department of Defense converts all incoming HTML email to text email.<ref>[http://www.fcw.com/article97178-12-22-06-Web/ DOD bars use of HTML e-mail, Outlook Web Access]{{dead link|date=June 2012}}{{Dead link|url=http://www.fcw.com/article97178-12-22-06-Web/ DOD bars use of HTML e-mail, Outlook Web Access |date=September 2009}}</ref>
 
During periods of increased network threats, the US Department of Defense convertshas allconverted user's incoming HTML email to text email.<ref>[http{{cite web|publisher=nextgov.com|url=https://www.fcwnextgov.com/article97178-cybersecurity/2006/12/dod-22bars-06use-Web/ DOD bars use of HTML -html-e-mail, Outlook Web Access]{{dead link-outlook-web-access/213308/|date=JuneDecember 2012}}{{Dead22, 2006 link|urltitle=http://www.fcw.com/article97178-12-22-06-Web/ DOD bars use of HTML e-mail, Outlook Web Access |dateaccessdate=September 20092024-06-22}}</ref>
 
The multipart type is intended to show the same content in different ways, but this is sometimes abused; some [[email spam]] takes advantage of the format to trick [[spam filter]]s into believing that the message is legitimate. They do this by including innocuous content in the text part of the message and putting the spam in the HTML part (that which is displayed to the user).
 
Most email spam is sent in HTML{{Citation needed|date=December 2013}} for these reasons, so spam filters sometimes give higher spam scores to HTML messages.{{Citation needed|date=December 2013}}
 
In 2018 a vulnerability ([[EFAIL]]) of the HTML processing of many common email clients was disclosed, in which decrypted text of [[Pretty Good Privacy|PGP]] or [[S/MIME]] encrypted email parts can be caused to be sent as an attribute to an external image address, if the external image is requested. This vulnerability was present in Thunderbird, macOS Mail, Outlook, and later, Gmail and Apple Mail.<ref name="ars">{{cite web|url=https://arstechnica.com/information-technology/2018/05/decade-old-efail-attack-can-decrypt-previously-obtained-encrypted-e-mails/|title=Decade-old Efail flaws can leak plaintext of PGP- and S/MIME-encrypted emails|website=arstechnica.com|date=14 May 2018 }}</ref>
 
== See also ==
* [[Enriched text]] an HTML-like system for email using MIME
* [[MHTMLEmail production]]
 
== References ==
{{Reflist|2}}
 
== External links ==
* https://www.caniemail.com/
 
[[Category:Email]]
[[Category:Internet terminology]]
[[Category:HTML]]
tgytgkkkuiiikkkkkkkkkkkkkkkkkkkkkkkkb