Whenever we want to collect the data from the client and send it to the server for processing, implementing an HTML form is the best choice. We will be covering this in this recipe.
Creating your first HTML form
How to do it...
In this recipe, we will create a simple HTML form that has two input fields and a button to submit the form. Perform the following steps:
- Create login-form.html inside the templates directory, as follows:
$ mkdir templates && cd templates && touch login-form.html
- Copy the following content to login-form.html:
<html>
<head>
<title>First Form</title>
</head>
<body>
<h1>Login</h1>
<form method="post" action="...