How do templates work in Django?

Templates are used in Django to dynamically build web content. The templating engine in Django is responsible for parsing, processing, and turning the template into a HttpResponse to send back to the client. By default, these templates are written in Django Templating Language (DTL), which enables us to generate dynamic information in the templates based on data provided by the view.

Django templating makes it easier to build web pages.

Lets say you want to print a simple text “Hi” on the screen. Then a simple Django view can print it easily.

But imagine a full html page with lots of html content. You can definitely show the html page in Django without using a template. But thats not proper because its not an easier/cleaner way. It will increase the size of your view as you have write all the html content in the view.