Automatically generated HTML, as produced by WYSIWYG programs, typically contains much repetitive and unnecessary markup. This paper identifies aspects of such HTML that may be altered while leaving a semantically equivalent document, and proposes techniques to achieve optimizing modifications. These techniques include attribute re-arrangement via dynamic programming, the use of style classes, and dead-code removal. These techniques produce documents as small as 33% of original size. The size decreases obtained are still significant when the techniques are used in combination with conventional text-based compression. Categories and Subject Descriptors E.4 [CODING AND INFORMATION THEORY]: Data compaction and compression; H.3.5 [INFORMATION STORAGE AND RETRIEVAL]: Online Information Services-Web-based services; H.5.4 [INFORMATION INTERFACES AND PRESENTATION]: Hypertext/Hypermedia; D.3.4 [PROGRAMMING LANGUAGES]: Processors--Optimization, Parsing General Terms Performance, Algorithms Keyw...