Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A <pre> is the correct kind of HTML use for the body of plain text email ? It looks like paragraphs of text to me.

<p> is far more appropriate

That isn’t apple’s problem, nor mine.



pre is the only correct element to use since in many emails, the exact formatting and linebreaks and such are important.

For example, a code review on a mailing list can only make sense with the linebreaks and spacing preserved.

However, as you knew to try, there is "reader mode", which is meant to heuristically ignore the exact html in order to display textual content.

Firefox's reader mode has no trouble figuring out that this is a block of text that can be reflowed.

Safari's heuristics clearly fall short on one of the more common kinds of textual blurbs you might want to reader-view-ize.

Seems like a safari problem to me.


> Firefox's reader mode has no trouble figuring out that this is a block of text that can be reflowed.

It was absolutely unreadable on mobile Firefox (Android), initially didn't even think to use the reader mode, which indeed did help make it readable!

I think this is the first time I've ever actually needed that functionality, never quite got it beforehand. Thanks for the suggestion!


Ok you changed my view


<pre> is the correct HTML. People writing plain-text email expect to be able to do things like add ASCII diagrams:

  -------        -------
  | foo |  --->  | bar |
  -------        -------
It's an older technology but it checks out.


it's a plain text email, which is exactly the sort of thing &lt;pre&gt; is for - pre-formatted text




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: