CONTACT SECTIONS / FREE HTML + ASTRO

Split office contact section

A two-column contact section pairing an office address and telephone links with a labeled enquiry form.

Try the design

Open demo ↗

Preview links stay in the example. Copy the source to use your own destinations. Form previews never send information.

Copy the source

<section class="fct-split-office-contact s-contact s-office" data-snippet="split-office-contact" aria-labelledby="fct-split-office-contact-heading"><div class="s-wrap"><h2 id="fct-split-office-contact-heading" class="s-visually-hidden">Split office contact section</h2><div class="s-contact-layout"><div><p class="s-kicker">Come by or get in touch</p><h2>Let’s talk<br>about it.</h2><address>12 Example Street<br>Example Town · AB1 2CD</address><p><a href="tel:+441632960000">+44 (0)1632 960000</a></p><p><a href="mailto:office@example.com">office@example.com</a></p><p class="s-muted">Replace these example business details.</p></div><form data-demo-form action="#" method="post" aria-label="Contact enquiry"><fieldset disabled><legend class="s-visually-hidden">Your enquiry details</legend><label for="fct-split-office-contact-name">Name (required)</label><input id="fct-split-office-contact-name" name="name" type="text" required autocomplete="name" maxlength="100"><label for="fct-split-office-contact-email">Email (required)</label><input id="fct-split-office-contact-email" name="email" type="email" required autocomplete="email" maxlength="254"><label for="fct-split-office-contact-message">Message (required)</label><textarea id="fct-split-office-contact-message" name="message" rows="4" maxlength="3000" required></textarea><button type="submit" class="s-button">Send enquiry</button></fieldset><p class="s-demo-note" role="status">Demonstration only. Connect your backend before collecting information.</p></form></div></div></section>

Where this design fits

Visitors can choose between calling the office and writing a message. The desktop split becomes one column on small screens, with the business details before the form.

  • Office contact panel
  • Name, email and message
  • Native required-field validation

What is included

The HTML ZIP includes a standalone demo, reusable markup, scoped CSS, its small JavaScript runtime, a license and setup notes. The Astro ZIP includes Snippet.astro. It can be imported into an existing Astro page or layout.

Connect a real form backend

These forms demonstrate layout and native browser validation. No messages are sent. Configure the form action, remove the demo interception and disabled fieldset, then implement delivery, server validation and spam handling on your backend. Test actual success and error responses before publishing. An appointment request does not confirm availability.

Add it to an HTML website

  1. Copy snippet.html into the relevant page section.
  2. Load snippet.css after your existing site stylesheet. The class prefix identifies this design.
  3. Load snippet.js once with defer. Keep the included keyboard behavior when adapting interactions.
  4. Replace example content and check mobile widths, zoom, links and keyboard focus in your actual website.

Use it in Astro

Copy Snippet.astro into src/components/, import it into your page or shared layout, and insert the component where the section belongs. Keep each generated prefix unique if you duplicate a component on one page.

Keep the section maintainable

Start with the variables at the top of the CSS for background, text and accent colors. Preserve semantic labels and focus styles. Existing site selectors can still affect imported markup, so test the combined result. Read the complete setup notes.

GOOD DESIGN, OCCASIONALLY.

Your next idea
could start here.

New templates, useful guides, and updates from us.
A little inspiration for whatever you’re building.