SHOP PRODUCTS
Houzz Logo Print
chuggerguy

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)

Sponsored
SK Interiors
Average rating: 5 out of 5 stars49 Reviews
Loudoun County's Top Kitchen & Bath Designer I Best of Houzz 2014-2022