How to keep the indentation after submitting a text input form

I’m having a little problem : when I save the text input into my database with indentation it gets saved correctly, for example, If I type in :

  1. first
  2. second
  3. third

After submitting this text input, it’s gonna be saved in my database exactly the way I wrote it, however, when I try to get the saved input and display it on the page, I receive it without any indentation just like so : 1. first 2. second 3. third.
How can I keep the correct indentation when getting the data from the database? Appreciate any tips!