create code/script html blogger form contact us simple

Code/script html blogger form contact us

In the above code, the form is created using the <form> element. The action attribute specifies the URL where the form data will be submitted for processing (e.g., "submit_form.php" in this example).

create code/script html blogger form contact us

Script code : 

<html>

<head>

  <title>Contact Us</title>

</head>

<body>

  <h2>Contact Us</h2>

  <form action="submit_form.php" method="post">

    <label for="name">Name:</label>

    <input type="text" id="name" name="name" required><br><br>

    

    <label for="email">Email:</label>

    <input type="email" id="email" name="email" required><br><br>

    

    <label for="message">Message:</label><br>

    <textarea id="message" name="message" rows="5" cols="30" required></textarea><br><br>

    

    <input type="submit" value="Submit">

  </form>

</body>

</html>


Each form input field is defined using the <input> element, and the name attribute assigns a unique name to each input field. The required attribute ensures that the user must fill out the field before submitting the form.


The <textarea> element is used for the message field, allowing users to enter multiple lines of text.


The submit button is created using <input type="submit">, and clicking on it triggers the form submission.


Note that you would need to have server-side code (such as PHP) to handle the form submission and process the data. In the example, the form data is submitted to "submit_form.php" using the method="post" attribute. 


You can customize the form submission handling according to your requirements.

Post a Comment

Previous Post Next Post

Contact Form