How to wrap text in a pre tag

A pre tag can wrap the text it contains using the following CSS code white-space: pre-wrap;.

Syntax:

pre {
    white-space: pre-wrap;  
}

Setting the white-space css to pre-warp allows wrapping of the text in the UI. The parameter can be set to normal to behave as regular html or nowrap to avoid wrapping the lines.

References:

Mozilla pre