I wish to display pre-formatted text as stored in a MySQL database but want to avoid displaying the text in the fixed-width font that <pre>
imposes
Or am I mistaken that imposes any particular font but merely defaults to fixed-width?
I wish to display pre-formatted text as stored in a MySQL database but want to avoid displaying the text in the fixed-width font that <pre>
imposes
Or am I mistaken that imposes any particular font but merely defaults to fixed-width?
The same way you use a variable width font in any other element: With the CSS font-family property.
pre { font-family: helvetica, sans-serif; }
<pre>Hello
World</pre>
Found a solution .... adding white-space: pre-wrap;
to the CSS style for the element displaying the text achieved the result I was looking for