0

I am trying to use \n as a newline in HTML, using CSS pre-line, but not able to do it.

#just-line-break 
{
    white-space: pre-line;
}

#line-break-and-tab 
{
    white-space: pre-wrap;
}

Getting data through python.

<p id="just-line-break">
{% if data %}
{{data}}
{% endif %}
</p>
Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

0 Answers0