A static website has no server to receive a form, so the form has to post to an address run by someone else. Write an ordinary HTML form, set its action to a form endpoint, and the submissions are stored and emailed to you.
This works the same on every static host and with every site generator, because the browser does the sending. Nothing runs on your side.
What a static site is missing
An HTML form only describes the boxes. When a visitor presses the button, the browser sends what they typed to the address in the form's action attribute. On a static site nothing is listening at your own address, so the data is lost unless the action points somewhere that can receive it.
That somewhere is a form backend. You could also write a serverless function, but then you maintain the code, the email sending and the spam filtering yourself.
Step by step
- Get a form endpoint. In FormTango, create a free account, add a form and copy the endpoint from its Setup tab. It looks like https://formtango.com/f/YOUR_FORM_ID.
- Write the form tag with that address as the action and POST as the method.
- Add your fields. Give every input, select and textarea a name attribute, because the browser only sends named fields.
- Add a hidden spam trap field (shown below).
- Publish the page and send one message through it.
The form
Each line below goes inside your page, in this order:
<form action="https://formtango.com/f/YOUR_FORM_ID" method="POST">
<label>Name <input type="text" name="name" required></label>
<label>Email <input type="email" name="email" required></label>
<label>Message <textarea name="message" required></textarea></label>
<input type="text" name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>
Prefer not to type it? Copy the contact form template or build your own fields with the HTML form generator.
What happens when someone submits
With FormTango the submission is stored in an inbox, checked for spam, and emailed to you. The visitor is taken to a thank-you page. If the form has a field named email, pressing Reply on the notification answers the visitor directly.
The free plan covers 1,000 submissions a month with unlimited forms. Paid plans start at $9 a month.
Common mistakes
- No name attribute on a field. An input with only an id or a placeholder is not sent.
- No method, so the browser uses GET and puts the message in the address bar.
- An action of mailto:, which opens the visitor's email program instead of sending anything.
- Testing by opening the HTML file and never testing the published page.
Check it before you publish
Paste your form into the form checker to catch a missing name, method or action. There are host-specific walkthroughs in the guides, including GitHub Pages, Netlify and Cloudflare Pages.
Common questions
- Can a static website have a contact form?
- Yes. The form is plain HTML and its action points at a form backend, which receives the submission for you. No server, PHP or database is needed on your side.
- Do I need JavaScript for a contact form on a static site?
- No. A plain HTML form with an action and method="POST" works without any JavaScript. JavaScript is only needed if you want to stay on the page and show your own success message.
- Is it safe to put the form endpoint in my HTML?
- Yes. A form endpoint can only receive submissions. It cannot be used to read them, so it is safe in a public page or repository.
Written by the FormTango team. Facts about other services were read from their own pages on November 22, 2026. Spotted something out of date? Tell us and we will fix it.