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: 2021 Analysis

Copyright © 2019-2021 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 September 2021, I repeated the study, again with 20 HTML-formatted and multi-part (plain-text and HTML-formatted combined) messages each from a different sender.

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.

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".

NOTE WELL: In the chart below, two-part messages are indicated. The total size of a two-part message is equal to the sum of the plain-text and HTML-formatted sizes plus about 4-6 KB for the header section. Thus, two-part messages might appear to increase bloat. This was not considered during any of these studies, however, because part of that increase — the plain-text part — is actually valid text content. Nevertheless, two-part messages require more bandwidth to send and receive and more disc space to store than messages that are only HTML-formatted.

Raw Data
(sizes in bytes)
Msg #Plain SizeHTML SizeBloat
Factor
HTML
Errors
Errors
per KB
2-Part
Message
13,33951,50115.4210.4
28,159149,67318.3200.1
31,45741,76728.71453.5
42,2159,2334.227730.0
54412,6786.14817.9
62,12235,39916.756115.8x
73241,9766.12311.6x
83,30652,67115.982915.7x
976810,21013.3383.7
101,69737,73722.286422.9
1191915,99817.4573.6x
123,57545,93312.849510.8x
139773,0043.162.0
141,34526,62919.8893.3x
151,70555,69432.72744.9x
163,04519,5896.4221.1x
171,32750,84238.3280.6
185,64656,78310.12123.7x
192411,5336.47347.6x
204,19554,49413.0691.3x

New study 24 September 2021


Valid HTML 4.01