Skip to content

How To Keep Original Format of Text by CSS

  • CSS

white-space: pre-wrap

Of course, you can use <pre> to keep the format:


But the question is, it will not wrap the line when text overflow, so the best way is to add a CSS property in the <p>

<p style="white-space: pre-wrap;">

Leave a Reply

Your email address will not be published. Required fields are marked *