To use a new line(\n) in string and rendering the same in HTML and CSS, we set the white-space
property.
For instance, we write
body {
white-space: pre-wrap;
}
to apply the white-space: pre-wrap;
style to the body element to make new line character render as a new line in HTML.