Houzz Logo Print

pre tag vs. white-space:pre style

this is in
a pre tag

this is in
a white-space:pre div

They seem to look pretty much the same while typing them. "div" is lined up directly under "tag" etc.

<div style="white-space:pre;"> may be a few more characters to type than <pre> but I often add a couple other styles anyway. Such as border and background.

Easier than a table if you just want some quick aligned columns? Or just an alternative method, another tool?

Comments (5)