You need a contact form on a page, so you search for contact form HTML, copy a block of code and start adjusting it. You rename a field, delete an attribute you don't recognise, tidy the indentation, paste the form into the footer as well. Then you send yourself one test message. It arrives, and you move on.

That one test is the trouble. A form can lose the visitor's email address, or cut the message short, or do nothing at all when Send is pressed, and still look fine to the person who built it. So on 6 December 2026 we took one correct contact form and made 17 small edits to it, one at a time, the kind that happen when code is copied and adjusted. Each version was filled in and sent in Chromium 153, Firefox 155 and WebKit 26.6, and a local server wrote down exactly what arrived.

The short answer

A working HTML contact form needs an action that points at something able to receive it, method="POST", a name on every field, a <label> tied to each field by matching for and id, type="email" and required where they apply, and a <button type="submit">. The page around it needs <meta charset="utf-8">.

Of our 17 edits, 15 made the form worse: a field went missing, the text arrived cut or garbled, the message went to the wrong place, or nothing was sent. The three browsers behaved the same in every case, and in none of the 15 did the browser show the visitor a warning. Two edits did no measurable harm.

The form we started from

This is the form every edit was made to. It's the first code block on our HTML contact form code page, unchanged except that in the test the action pointed at our local server.

<form action="https://formgong.com/submit" method="POST"> <input type="hidden" name="access_key" value="fk_your_access_key"> <label for="name">Name</label> <input id="name" name="name" autocomplete="name" required> <label for="email">Email</label> <input id="email" type="email" name="email" autocomplete="email" required> <label for="message">Message</label> <textarea id="message" name="message" rows="6" required></textarea> <div aria-hidden="true" style="position:absolute;inset-inline-start:0;top:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)"> <label>Leave this field empty <input type="text" name="botcheck" tabindex="-1" autocomplete="off"></label> </div> <button type="submit">Send</button> </form> 

We typed the name Zoë Müller, the address zoe@example.com and the message Hi, do you ship to Canada? ✓, then clicked Send once. Unedited, the form delivered all three values intact in all three browsers.

What each edit did

Seven edits to a correct contact form and what the server got after each

One edit What the server got What the visitor saw
Email input without name Name and message, no email Thanks page
Form without method A GET with everything in the URL Thanks page
Form without action Nothing; the POST went to the page itself "405 Not Allowed"
Email input as type="text" zoe.example.com as the address Thanks page
No required An empty message Thanks page
Line break and indent inside <textarea> Two spaces as the message Thanks page
<button type="button"> Nothing Nothing happened
<label for> that doesn't match the id Everything A field with no name for screen readers
Placeholders instead of labels Everything No difference we could measure
</textarea> missing Nothing No Send button on the page
enctype="text/plain" One block of text instead of fields Thanks page
Consent checkbox, left unchecked Everything, no word about consent Thanks page
maxlength="20" on the message Hi, do you ship to C Thanks page
Button named submit, script calls form.submit() Nothing Nothing happened
Page without <meta charset> Zo%EB+M%FCller and &#10003; Thanks page
Prefilled subject marked disabled Everything except the subject Thanks page
The same form pasted twice Everything The second form's label focuses the first form

Fields that never leave the browser

A browser only sends fields that have a name. We removed name="email" and the request body was this, in all three browsers:

access_key=fk_your_access_key&name=Zo%C3%AB+M%C3%BCller&message=Hi%2C+do+you+ship+to+Canada%3F+%E2%9C%93&botcheck= 

The visitor typed an address and got the Thanks page. You'd get a message you can't answer. It's an easy edit to make by accident, because the id is still there and the field looks and validates exactly as before.

A disabled field goes the same way. People add a prefilled subject line and disable it so visitors can't change it. The browser then leaves it out of the request altogether. With readonly in place of disabled the same field arrived as subject=Website+enquiry.

The message goes somewhere else

Without method, a form sends a GET, and the fields are appended to the address. The page the visitor landed on had this URL:

/submit?access_key=fk_your_access_key&name=Zo%C3%AB+M%C3%BCller&email=zoe%40example.com&message=Hi%2C+do+you+ship+to+Canada%3F+%E2%9C%93&botcheck= 

That address is what gets stored in the visitor's browser history and in server access logs. We saw the same thing happen with a vendor's own snippet in our static site test.

Without action, the form posts to the page it sits on. Our test host answered the way three of five static hosts did when we tried them in November, with "405 Not Allowed". The visitor at least sees that something went wrong. You don't, since nothing reaches you.

Send does nothing

Three edits left the visitor clicking a dead button. With type="button" in place of type="submit", the click sent no request and showed no message.

When the closing </textarea> was missing, the textarea swallowed everything after it, the Send button included. The page had no button at all, and pressing Enter in the name field sent nothing either.

The third one needs a little JavaScript. A common pattern is to check something in a submit handler and then call form.submit(). If the button is named submit, that name replaces the method. All three browsers logged form.submit is not a function to the console, and the visitor saw a page that ignored the click. The same script with an unnamed button sent the form normally.

The browser stops checking for you

With the unedited form, an address without @ is stopped before anything is sent. Chromium says "Please include an '@' in the email address." Change the field to type="text" and zoe.example.com goes straight through.

Remove required and an empty form is sent: name=&email=&message=.

The third case surprised us more. It starts when the closing tag of an empty textarea ends up on its own line:

<textarea id="message" name="message" rows="6" required> </textarea> 

The parser drops the first line break, but the two spaces of indent stay and become the field's value. The field now counts as filled, so required has nothing to complain about. We left the message untouched, clicked Send, and the server got message=++, which is two spaces. The unedited form refused to send in the same situation. We've seen it in the wild. When we read nine copy-paste contact forms in October, one well-known tutorial shipped its required textarea with a space inside.

The text arrives changed

maxlength="20" on the message field accepted 20 characters and ignored every key after that, with no message. We typed 26 characters and Hi, do you ship to C arrived.

A page without <meta charset="utf-8"> was the worst of this group. All three browsers treated the page as windows-1252 and encoded the form the same way. The server got name=Zo%EB+M%FCller. A server that decodes it as UTF-8 reads Zo� M�ller. The check mark doesn't exist in windows-1252, so the browser sent it as the literal text &#10003;. Six of those nine tutorial snippets came without a charset line, so it's an easy one to inherit.

With enctype="text/plain" the request has the content type text/plain, and the body is a list of lines, one name=value per line. The HTML standard itself says this format is meant for people to read and can't be parsed reliably. When we fed that body to a standard form parser, it found a single field called access_key holding the whole message.

Labels that point at the wrong field

We changed one label to for="mail" while the input kept id="email". The form still sent everything. But in each browser's accessibility tree the address field had no name: a screen reader would announce a text box and nothing more. Clicking the word "Email" no longer moved the cursor into the field.

Pasting the same form twice on one page, say in the content and again in the footer, breaks labels in a quieter way. Both copies carry the same ids. Clicking "Email" in the second form put the cursor into the email field of the first form, in all three browsers.

Two edits that did no harm

Replacing the labels with placeholders left every field with an accessible name, taken from the placeholder, and the form sent as before. A placeholder disappears once you start typing, which is a real cost, but it's one this test didn't measure.

An unchecked checkbox sends nothing: no consent=off, no empty value. Checked, it sent consent=on. That's how checkboxes are meant to work. It's worth knowing if anything on your side expects the field to always be there.

How we tested

Each version was a page served from a local static host. The form posted to a second local server that recorded the method, the address, the content type and the raw body, and answered with a Thanks page. Nothing was sent to a real service. The browsers were Playwright 1.63.0's builds of Chromium 153, Firefox 155 and WebKit 26.6, run headless on Linux with an en-US locale. The list of edits and the way we'd label the results were written down before the first run.

Three limits. Playwright's WebKit is the engine behind Safari, built for Linux, and Safari itself wasn't tested. The charset result depends on the browser's default encoding, which follows the locale. And autofill can't be exercised in a headless browser, so we have nothing to say here about autocomplete.

Where the form posts to

The markup above is half of a contact form. The action still has to point at something that receives the POST, filters spam and gets the message to you. That's what we build at Formgong: the form's backend, an inbox for the messages, and notifications by email or Telegram, with free website templates that already have the form wired in. If you'd rather not write the markup by hand, the free HTML form generator builds a form like this one field by field.

If you've lost messages to an edit that isn't on this list, tell us in the comments. And if you try Formgong, we'd like to hear what was confusing or missing.