Course Content
Flask Intensive Course: Web Development with Python
1. Introduction to Flask
Flask Intensive Course: Web Development with Python
Whitespaces
If we want to add something with the different new lines, like multiple lines:
Let say:
Line 1
Line 2
Line 3
And we post it as you can see the whitespace and new lines are not preserved and are not being rendered here.
![](https://codefinity-content-media-v2.s3.eu-west-1.amazonaws.com/courses/b28849f8-b172-492e-aa31-d49e993e3760/section-4/no-whitespace.png)
Let's go to recipes and the loop where the content is printed out.
And inside <p>
tag write style="white-space: pre-wrap"
. And go back and refresh.
![](https://codefinity-content-media-v2.s3.eu-west-1.amazonaws.com/courses/b28849f8-b172-492e-aa31-d49e993e3760/section-4/whitespaces.png)
As you can see, the whitespaces and new lines are all preserved. So, actually, we can have multiple paragraphs per recipe description.
Everything was clear?
Course Content
Flask Intensive Course: Web Development with Python
1. Introduction to Flask
Flask Intensive Course: Web Development with Python
Whitespaces
If we want to add something with the different new lines, like multiple lines:
Let say:
Line 1
Line 2
Line 3
And we post it as you can see the whitespace and new lines are not preserved and are not being rendered here.
![](https://codefinity-content-media-v2.s3.eu-west-1.amazonaws.com/courses/b28849f8-b172-492e-aa31-d49e993e3760/section-4/no-whitespace.png)
Let's go to recipes and the loop where the content is printed out.
And inside <p>
tag write style="white-space: pre-wrap"
. And go back and refresh.
![](https://codefinity-content-media-v2.s3.eu-west-1.amazonaws.com/courses/b28849f8-b172-492e-aa31-d49e993e3760/section-4/whitespaces.png)
As you can see, the whitespaces and new lines are all preserved. So, actually, we can have multiple paragraphs per recipe description.
Everything was clear?