Depending on the browser, HTML doesn't preserve white space very well unless you start doing CSS, which isn't supported uniformly in browsers. I do the following, which preserves white space on display and in the character serialization: