CSS to act like pre tag

December 8, 2010 by Jean

CSS code to keep preformatting (acts like <pre> tag):

p {white-space:pre;}

CSS code to remove preformatting (acts like <p> tag):

pre {white-space:normal;}

Source: http://www.w3schools.com/css/pr_text_white-space.asp

In: CSS