Viewable With ANY Browser

Note: My Web pages are best viewed with style sheets enabled.

Unrated

Plain-Text vs HTML E-Mail

Sizes and Errors: 2019 Analysis

Copyright © 2019 by David E. Ross

Definitions

bloat
the increase in the size of an HTML-formatted message to convey the same textual content as a plain-text message
bloat factor
a measure of bloat, computed by dividing the size of the HTML-formatted message by the size of the plain-text message that has the same content. If a 3,000 byte HTML-formatted message has the same content as a 600 byte plain-text message, the bloat factor is 3,000 ÷ 600 = 5.0.
KB
kilobyte, 1,000 bytes

History

In the fall of 2008, I examined 20 HTML-formatted E-mail messages. From this study, I concluded that the average bloat factor was 3.4 and that HTML-formatted messages contained an average of 9.1 HTML errors per KB of file size.

Early in 2010, I decided to repeat this study for several reasons.

I again collected 20 HTML-formatted E-mail messages. This time, the average bloat factor was 4.6 (worse than in 2008); and HTML-formatted messages contained an average of 4.6 HTML errors per KB of file size (only half the ratio in 2008).

After two more years during which E-mail clients might have further evolved, I repeated the 2010 study with a fresh set of 20 HTML-formatted messages collected during January 2012. Unlike the 2010 study, however, I did not collect data on what E-mail clients were used; in 2010, half the messages failed to indicate any client while in 2012 that grew to three-fourths of the message not indicating any client, preventing any use of client identifications. E-mail clients and the HTML specifications both evolved since the 2012 study. Therefore, I decided in 2015 to again repeat the study.

Yet again, I repeated the study with another 20 E-mail messages collected in June of 2019 to see what changes might have occurred in HTML-formatted E-mail in the prior four years.

Findings

Conclusions


Methodology

I collected 20 messages that were either HTML-formatted or were two-part (containing both plain text and HTML). Making sure that no two messages were from the same source, I stored each message four times. I excluded any attachments (which, for HTML-formatted messages, means excluding any images or background). The first two of these were used in my analysis. The last two were saved in case I needed further information.

  1. I stored the readable content from the first line to the end of the message into a plain-text file.
  2. I stored the raw message (the source file) from the <x-html> tag to the </x-html> tag (excluding those tags) into an HTML file.
  3. I saved the source file, which in some cases reflected a 2-part message — a message that included both plain-text and HTML formatting. This included the entire header section.
  4. I stored the source file without the header section.

I recorded the sizes of the first two in a spread sheet — the first file as Plain and the second as HTML. Dividing the total of the HTML sizes by the total of the Plain sizes gave me the average bloat factor. Because bloat is meaningful in the gross context over many messages — in terms of bandwidth impacts, disc space occupied, etc — this average is based on the total size of all messages compared with the total size of the equivalent plain-text content. If I had averaged the individual bloat factors of each message, the result would have been 16.9, greater than the 16.0 reported under "Findings".

Note that the Plain files might not contain all the content intended for the message. This would be caused by placing text within images, which would make the message incomplete for a blind person using an audio browser. For commercial messages, this would be a violation of the Americans with Disabilities Act.

Six of the messages were 2-part (both plain-text and HTML-formatted). The overall sizes of the 2-part messages were not considered when computing bloat, which would have been even greater if they had been considered.

For HTML errors, I used the W3C Markup Validation Service. I input the content of an HTML file. If the message's HTML included a <!DOCTYPE> declaration (which is required for Web pages), I selected the "Validate Full Document" option. Otherwise, I selected the "Validate HTML fragment" option, specifying "HTML 4.01 Transitional" (which is the least restrictive HTML 4.01 syntax) and then repeated with "HTML5 (experimental)", choosing the least number of errors between them. I recorded the number of errors on the same spreadsheet. Dividing the number of errors by the HTML size and multiplying by 1,000 gave me the proportion of HTML errors per KB of HTML for each message. Because the impact of HTML errors falls on individual messages, I then took the average of the individual proportions. If I had instead used the total number of errors versus the total HTML sizes, the result would have been 6.4 HTML errors per KB of message size, fewer than the 7.3 reported under "Findings".

Unlike prior studies, this study did not include any spam messages.

Raw Data
(sizes in bytes)
Msg #Plain SizeHTML SizeBloat
Factor
HTML
Errors
Errors
per KB
2-Part
Message
11513922.612.6x
22,4319,3413.860.6x
34,143138,93433.5180.1
42,89948,46616.71132.3x
51,53041,64227.23708.9x
63654,27511.7429.8x
78073,9614.94411.1
810,702108,95210.210019.2
91,23128,62923.360.2x
101,92529,33915.234311.7
113,36313,6104.0312.3x
121,75846,41526.463213.6x
131,77619,36510.921010.8x
142,13221,96710.32069.4x
1563824,00337.61978.2x
162,46537,87015.41744.6x
173,26763,67419.577312.1x
182,77061,32722.1781.3
1988115,93318.127117.0x
2073318,34425.019910.8x

Updated 23 June 2019


Valid HTML 4.01