Frontend HTML Generation
Let’s start creating the HTML and CSS necessary to generate the frontend of our chat application. We will be using HTML, CSS, and Bootstrap to create the user interface and jQuery to handle the communication between the frontend and the backend. The HTML and CSS will be responsible for creating the structure and style of the user interface.
When creating a Flask web application, it is recommended to keep your HTML files in a separate folder called templates
. This is because Flask uses the Jinja2 template engine, which allows you to write reusable HTML code in a more modular way by separating it into smaller, reusable pieces called templates.
To create the templates
folder, simply create a new directory in your project directory and name it templates
. Inside the templates
folder, you can create your HTML file, called index.html
in this case. To do that, right-click on the templates
folder and select New | HTML file. Here is what the project directory...