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
  • 43,885
  • 25
  • 111
  • 113

0 Answers0