Contact Form

15 mins

Building forms is a common task in Front End. In this exercise, we will build a basic "Contact Us" form, commonly seen on marketing websites for visitors to ask questions or provide feedback.


  • The form should contain the following elements:
    • Name field
    • Email field
    • Message field. Since the message can be long, using a <textarea> will be good.
    • Submit button
      • Contains the text "Sent".
      • Clicking on the submit button submits the form.
  • The form and submission should be implemented entirely in HTML. No JavaScript should be used for this question.
  • There is no need to do any validation on the fields. Validation will be done on the server side.

Submission API

Upon submission, POST the form data to with the following fields in the request body: name, email, message.

If all the form fields are filled up, you will see an alert containing a success message. Congratulations!


Premium FeaturePurchase premium to see companies which ask this question.

Try these questions next

Similar Questions