HTML contact form template
Give visitors a clear way to reach you. Keep the form short, then connect it to receive enquiries by email and in your inbox.
Made for
- Business websites
- Personal portfolios
- General enquiries
Use this form on your website
- Edit the fields and design.
- Connect your account and copy your form URL.
- Paste the HTML into your website, or ask your AI to connect it.
Included fields
- Name
- Message
HTML
<style>
.gf-form, .gf-form * { box-sizing: border-box; }
.gf-form { display: grid; gap: 20px; max-width: 560px; margin: 0 auto; padding: 32px; color: #111216; background: #fff; font: 14px/1.5 system-ui, sans-serif; }
.gf-form h1, .gf-form h2 { margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -.04em; }
.gf-form .gf-field { display: grid; gap: 7px; min-width: 0; }
.gf-form label, .gf-form legend { font-weight: 500; }
.gf-form input, .gf-form textarea, .gf-form select { width: 100%; border: 1px solid #d8d9e1; border-radius: 8px; background: #fff; color: inherit; padding: 11px 12px; font: inherit; }
.gf-form textarea { min-height: 112px; }
.gf-form input[type=checkbox], .gf-form input[type=radio] { width: auto; margin-right: 8px; }
.gf-form button[type=submit] { border: 0; border-radius: 8px; padding: 12px 18px; background: #2541e8; color: #fff; font: inherit; font-weight: 500; cursor: pointer; }
.gf-form fieldset { border: 0; padding: 0; margin: 0; }
.gf-form .gf-choice-field { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; }
.gf-form .gf-choice-field > input { grid-column: 1; grid-row: 1; width: 16px; height: 16px; margin: 3px 0 0; padding: 0; }
.gf-form .gf-choice-field > label { grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
.gf-select-wrap {
display: grid;
grid-template-columns: minmax(0, 1fr);
align-items: center;
min-width: 0;
}
.gf-select-wrap > select {
grid-column: 1;
grid-row: 1;
appearance: none;
padding-right: 44px;
}
.gf-select-wrap > svg {
grid-column: 1;
grid-row: 1;
justify-self: end;
width: 18px;
height: 18px;
margin-right: 16px;
pointer-events: none;
}
.gf-required-indicator { color: #6b6c77; font-weight: 400; margin-left: 3px; }
@media (max-width: 480px) { .gf-form { padding: 20px; } }
</style>
<form action="YOUR_FORM_URL" method="POST" class="gf-form">
<h2>Contact us</h2>
<div class="gf-field"><label for="template-contact-0">Name</label><input type="text" id="template-contact-0" name="name"></div>
<div class="gf-field"><label for="template-contact-1">Email</label><input type="email" id="template-contact-1" name="replyto" required placeholder="[email protected]"></div>
<div class="gf-field"><label for="template-contact-2">Message</label><textarea id="template-contact-2" name="message" required></textarea></div>
<button type="submit">Send message</button>
</form>Questions about this template
Can I keep my website design?
Yes. Copy the receiving URL into your existing form or edit this template to match your site.
Which fields are required?
Email and message are required in this template. You can change labels and requirements in the editor.