A contact form template is the smallest useful thing on this site and the most likely to be shipped half finished. The fields are obvious enough that everybody gets them right. The part that is missing from every template, necessarily, is the two attributes on the form element, because nobody writing a template knows where your submissions should go. That is the gap this page closes.
Four fields, and why not five
A name so you know who is writing, an email address so you can answer, an optional subject if it genuinely helps you triage, and the message. That is the complete list for almost every site. Every extra field costs you submissions, and the fields people add first are the ones they want rather than the ones the visitor came to give: a phone number nobody wanted to leave, a company name on a personal enquiry, a dropdown of departments the visitor cannot possibly map their question onto. Ask for less and answer faster.
The two attributes the template left blank
method and action. The default method is get, which puts the whole message in the URL and into every log and history entry it touches, so set it to post. The action is the URL the browser sends the submission to, and on a static site there is nothing at your own domain that can receive it. Every contact form that looks perfect and does nothing is a form whose action was never filled in. Decide what receives the POST before you consider the page finished.
What happens after the button, in the visitor's view
The browser posts and then renders whatever the action URL returns, so something has to answer with a page a human can read. A confirmation that says the message arrived and when to expect a reply is worth more than a clever animation, because the alternative is somebody who cannot tell whether it worked sending the same message three times. If the form submits with JavaScript instead, the same rule holds: say plainly that it arrived, and say what happens next.
Spam, without ruining the form
A public contact form gets automated submissions from the day it is indexed. Most of it is stopped by unremarkable measures: a hidden field that only a bot fills in, a check on how quickly the form was completed, rate limiting at the endpoint. Reach for a visible puzzle last, because every one of them costs real submissions from real people, and the ones it costs you most are exactly the visitors you were hoping to hear from.
Questions people ask about html contact form template
Should the subject field be a dropdown?
Only if you genuinely route on it. A dropdown of departments makes the visitor guess which part of your organisation owns their problem, which is a question they cannot answer and you can. A free text subject, or none at all, is usually better.
Do I need a privacy note next to the button?
A sentence saying what you do with the message and that you will not pass it on takes ten seconds to write and answers a question a lot of people are quietly asking. Whether more is required of you depends on where you and your visitors are, which is not something a template can decide.
Why does my template submit and nothing happens?
Almost always an empty or placeholder action. The browser posts back to the current page, the static host serves the same file again, and it looks like nothing occurred. Point the action at something that accepts a POST and answers.