What this form is
This is the contact form I would start with on a static site before adding anything clever. It asks for a name, an email address, and the message. That is enough for most portfolio sites, product waitlists, local businesses, and early landing pages.
The important part is not the styling. The important part is the shape of the HTML: a real form, a public html.contact endpoint in action, method="POST", labels tied to controls, and a name on every field you expect to receive.
When to use it
- You need a contact form on a static page and do not want to write a backend route.
- You want a snippet that works in plain HTML, Astro, Eleventy, Webflow embeds, or a hand-coded landing page.
- You want browser validation and autocomplete without adding JavaScript.
- You want the fewest possible fields so visitors can send the message quickly.
Fields explained
name uses autocomplete="name" so browsers and password managers can fill it correctly. That is not decoration. Autofill saves time, especially on mobile.
email uses type="email" and autocomplete="email". The type gives the browser a better keyboard on phones and catches obvious mistakes before the form posts.
message is a textarea because people need room to write. It still has a name, because html.contact stores submitted values by field name.
The submit button is plain type="submit". There is no click handler and no fetch call. The browser already knows how to submit a form.
Why it works well with html.contact
html.contact is built for normal browser form posts. Replace the public key in the endpoint, add your allowed domain in the dashboard, and this form can send submissions without a server, SMTP setup, or a database.