# Introduction Generating HTML from within Python is not fun, and actually pretty cumbersome because you have to do the HTML escaping with `escape` on your own to keep the application secure. Because of that Flask configures the **Jinja2 template engine** for you automatically. Templates can be used to generate any type of text file. For web applications, you’ll primarily be generating HTML pages, but you can also generate markdown, plain text for emails, and anything else. In this lab, we will learn how to use Jinja2 template engine to generate secure and dynamic templates.
Click the virtual machine below to start practicing