You can build a contact page without any frameworks using a single HTML file, a small CSS block, and one form handler. The only real decision is what happens after someone clicks Send: a static page needs an external form service or a server-side script, while hosted platforms like GitHub Pages, Netlify, or Cloudflare Pages accept form submissions through their own built-in handling. Everything else — layout, validation, spam protection, confirmation — can be done with native browser features and a few lines of JavaScript you write yourself.
This guide walks through the whole build in a workable order: choosing your form endpoint, writing the markup, styling it, handling validation and errors, testing, and keeping it maintainable. No React, no Bootstrap, no build step, no npm install. The target is a page you can open in a text editor, save, and put online.
Prerequisites: decide where the form data goes before writing markup
The most common beginner mistake is building the form first and only later discovering there's nowhere for it to submit. Contact pages have three viable no-framework backends:
1: A hosted platform with built-in form handling. Netlify Forms, Cloudflare Pages (with Functions or a form service), and Vercel (with a serverless or third-party handler) are the usual options. You add an attribute or configuration flag and the platform takes over. 2: A third-party form service. Providers like Formspree, Basin, and similar services give you an endpoint URL you paste into the form's action attribute. That's the simplest option if your page is hosted on plain GitHub Pages or shared hosting. 3: Your own server script. A small PHP, Python, or Node script processes POST requests, sends mail, and redirects. This is the most control and the most maintenance.
Pick one before you begin. It dictates the action, method, and field names. Also confirm two things with your provider: whether it supports server-side spam filtering, and whether it needs a specific hidden field or redirect URL for confirmations.
The final prerequisite is not technical: know what you'll actually do with the messages. A contact form without an owner who reads it is worse than no form at all.
Write the semantic HTML skeleton
Start with a document shell and a form that works even if CSS and JavaScript fail. That baseline is the part users on old browsers or restricted networks actually get.
Use elements properly tied to their inputs with for and id. That gives you clickable labels, screen-reader announcements, and native focus behavior for free. Put every field inside a , use type="email" and type="tel" where appropriate, and mark required fields with the required attribute.
Three details matter more than they look. First, the hidden _subject field is a convention many form services accept so the email arrives with a readable subject line; remove it if your provider doesn't support it. Second, field name attributes are the keys your endpoint receives, so match whatever your service documents. Third, keep the action and method attributes even if JavaScript will intercept the submission — without them the form silently does nothing when scripts fail.
Put the form in a real document structure: a with your name or logo and navigation, a with an ("Get in touch"), and a with an actual contact alternative, such as an email address. Including the email address matters. Some people won't use forms, and a page with no fallback contact method is a dead end for them.
Style it with a small, focused stylesheet
You don't need a framework to make a form look intentional. A compact stylesheet covering typography, spacing, input sizing, and focus states handles 90% of the visual work. Base your layout on a single centered column with a maximum width around 640px — narrow enough to read comfortably, wide enough for the textarea.
A practical starting point:
A few rules worth internalizing rather than copying blindly. box-sizing: border-box prevents padding from pushing inputs past the container edge. display: block on labels gives predictable vertical rhythm without floats or flex. font: inherit on inputs stops browsers from rendering form controls in a mismatched font, which is the single biggest tell of an unstyled form. Focus outlines are not decoration; removing them without a replacement breaks keyboard use.
Keep the stylesheet in a separate file linked from the page, or inline it in a