How can I create a simple HTML form without using JavaScript, AJAX or PHP?

You can create a simple HTML form using only HTML markup. Here's an example of a basic HTML form for collecting a user's name and email address:

htmlCopy code<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Form</title>
</head>
<body>

<h2>Simple Form</h2>

<form action="submit.php" method="post">
  <label for="name">Name:</label><br>
  <input type="text" id="name" name="name" required><br>
  <label for="email">Email:</label><br>
  <input type="email" id="email" name="email" required><br><br>
  <input type="submit" value="Submit">
</form>

</body>
</html>

In this example:

  • The <form> element defines the form and specifies the action attribute as "submit.php", which is the URL where the form data will be sent for processing.

  • The method attribute is set to "post", indicating that the form data will be sent via an HTTP POST request.

  • Inside the form, there are two <input> elements—one for the user's name and one for their email address. The type attribute specifies the type of input field (text or email), and the name attribute provides a name for the input field, which will be used to identify the data when it's submitted.

  • The required attribute is added to each input field to make them mandatory, ensuring that the user must enter a value before submitting the form.

  • Finally, there's a submit button <input type="submit"> that the user can click to submit the form.

When the user submits the form, the data entered into the form fields will be sent to the URL specified in the action attribute ("submit.php" in this case). Since you mentioned not using JavaScript or PHP, the form submission wouldn't be handled, but you can replace "submit.php" with the URL of your backend script if you want to process the form data using PHP or any other server-side language.