Canvas HTML Template addresses this directly with a dedicated contact block demo that combines a structured information panel, a working form, and clean Bootstrap 5 grid logic — all in a single reusable section. Whether you are building a corporate landing page, a service site for an agency, or a portfolio for a freelancer, understanding how to configure and adapt the Canvas contact block will save hours of layout work and produce a more trustworthy result for your visitors.
Key Takeaways
- The Canvas contact block pairs a contact information column with an inline form column in a responsive Bootstrap 5 grid.
- The information panel supports a physical address, phone number, and email address as distinct, scannable items.
- CSS custom properties (
--cnvs-themecolor) make brand-colour changes instant and consistent across the block. - You can duplicate and reconfigure the block for different contexts — minimal one-column forms, full-width map variants, or multi-office layouts — without touching the template’s core files.
- Pairing the contact block with schema markup improves local SEO signals and rich-result eligibility.
What the Canvas Contact Block Actually Contains
The Canvas block-contact-1 demo ships with a two-column layout at medium-and-above breakpoints. The left column holds the business identity information — a “Contact Us” heading, a physical address (121 King St, Melbourne VIC 3000, Australia), a phone number (+00 111 232 11 33), and an email address (noreply@canvas.com). The right column contains the actual form fields. On small screens, both columns stack naturally thanks to Bootstrap 5’s col-md-* system.
Each piece of contact information is presented as a discrete item rather than a wall of text. This matters because users scanning a contact page are looking for a single fact — the phone number, the suburb — and a flat paragraph forces them to read everything to find it. Discrete items, optionally accompanied by an icon, reduce that cognitive load immediately.

Anatomy of the HTML Structure
The core markup pattern follows a predictable Bootstrap 5 row-and-column structure. Below is a condensed representation of how the block is organised:
<section id="contact">
<div class="container">
<div class="row col-mb-50">
<!-- Contact information column -->
<div class="col-md-4">
<h3>Contact Us</h3>
<address>
<strong>Address:</strong><br>
121 King St,<br>
Melbourne VIC 3000,<br>
Australia
</address>
<p><strong>Phone:</strong> +00 111 232 11 33</p>
<p><strong>Email:</strong>
<a href="mailto:noreply@canvas.com">noreply@canvas.com</a>
</p>
</div>
<!-- Form column -->
<div class="col-md-8">
<form method="post" action="include/form.php">
<div class="row">
<div class="col-md-6 mb-3">
<label for="contact-name" class="form-label">Your Name</label>
<input type="text" id="contact-name" name="contact-name"
class="form-control" required>
</div>
<div class="col-md-6 mb-3">
<label for="contact-email" class="form-label">Your Email</label>
<input type="email" id="contact-email" name="contact-email"
class="form-control" required>
</div>
</div>
<div class="mb-3">
<label for="contact-message" class="form-label">Message</label>
<textarea id="contact-message" name="contact-message"
class="form-control" rows="6" required></textarea>
</div>
<button type="submit" class="btn btn-primary">Send Message</button>
</form>
</div>
</div>
</div>
</section>
The col-mb-50 utility class Canvas provides adds consistent bottom margin between stacked columns on mobile, ensuring the information panel and form never visually collide.
Four Layout Variations and When to Use Each
The base block is a starting point, not a constraint. Here are four practical configurations derived from it:
- Two-column (information left, form right) — the default. Best for professional services firms, agencies, and SaaS products where credibility details (address, phone) matter as much as the form itself. The physical address in particular signals legitimacy to first-time visitors.
-
Single-column centred form. Remove the information column entirely and centre the form in a
col-md-8 offset-md-2wrapper. Use this for SaaS trial sign-up pages or newsletter landing pages where you want zero distraction from the conversion action. -
Three-column details row above a full-width form. Duplicate the address, phone, and email into three equal
col-md-4cards separated by dividers, then place the form in a full-width row below. This works well for multi-location businesses or larger enterprises that need to surface regional office details prominently. -
Form left, map embed right. Swap the information column for a Google Maps
<iframe>or a lightweight static map image. This variant suits retail locations, restaurants, event venues, and any business where directions are the primary concern. Keep the address and phone as a short strapline above the map for accessibility and SEO.

Theming with CSS Custom Properties
Canvas exposes --cnvs-themecolor as the primary brand variable. Overriding it in a single :root declaration cascades the change through button backgrounds, focus rings, link colours, and any icon tints used in the information panel:
<style>
:root {
--cnvs-themecolor: #2563eb; / swap to your brand blue /
--cnvs-themecolor-rgb: 37, 99, 235;
}
</style>
This is a meaningful advantage over hardcoded colour values. When a client requests a rebrand, you change one line rather than hunting through multiple component files. If you are already combining Canvas blocks with a sticky navigation bar, note that the same variable controls the active-state indicator there too — see the guidance in How to Add a Sticky Header to Any Bootstrap 5 Template for details on that integration.
Adding Schema Markup for Local SEO
The address, phone, and email data in the contact block are ideal candidates for LocalBusiness schema. Adding structured data does not change the visual output but makes the information parseable by search engines, improving eligibility for rich results and local knowledge panels. A minimal JSON-LD block placed just before the closing </section> tag is sufficient:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Your Business Name",
"address": {
"@type": "PostalAddress",
"streetAddress": "121 King St",
"addressLocality": "Melbourne",
"addressRegion": "VIC",
"postalCode": "3000",
"addressCountry": "AU"
},
"telephone": "+00111232133",
"email": "noreply@canvas.com"
}
</script>
For a thorough walkthrough of schema implementation across an entire Bootstrap 5 project, the post on How to Add Schema Markup to a Bootstrap 5 HTML Template covers the broader strategy.
Form Handling and JavaScript Integration
Canvas ships with plugins.min.js and functions.bundle.js. The contact form hooks into these for client-side validation feedback and optional AJAX submission via the included include/form.php handler. To wire up the AJAX path, ensure data-form-ajax="true" is present on your <form> tag and that the server-side PHP file is accessible at the declared action path.
For static hosting environments — Netlify, Vercel, GitHub Pages — replace the PHP handler with a third-party form endpoint such as Formspree or Netlify Forms. Change the action attribute to the endpoint URL and remove the AJAX data attribute if the provider handles redirects natively. Since static HTML templates load faster than dynamic counterparts by default (see WordPress Page Speed: Why a Static HTML Template Loads Faster for the performance context), this architecture keeps both speed and simplicity intact.
If you are concerned about script load order and want to defer non-critical JavaScript, the principles in How to Implement Lazy Loading and Defer Scripts in HTML Templates apply directly to the form validation bundle.
Frequently Asked Questions
Yes. The block depends on Bootstrap 5 for its grid and form styles, and on Canvas’s own stylesheet for utility classes like col-mb-50 and the --cnvs-themecolor variable. If you are pulling it into a standalone page, include the Canvas CSS file alongside Bootstrap 5 and the block will behave as intended. You can safely omit Canvas JS files if you do not require the AJAX form submission or validation feedback.
Replace <div class="container"> with <div class="container-fluid px-0">. Each inner column will still respect its own padding, but the section will bleed to the viewport edges. This is useful when you place a background colour or image across the full section width.
Use Bootstrap 5 tabs (nav-tabs or nav-pills) to wrap multiple instances of the information panel, one per office. Each tab pane holds a distinct address, phone, and regional email. The form column can remain shared and static outside the tab structure, since the enquiry destination can be controlled via a hidden input that updates on tab change using a small vanilla JS snippet.
Canvas supports Bootstrap 5’s data-bs-theme="dark" attribute on the <html> element. The contact block inherits dark-mode form control styles automatically through Bootstrap’s colour-mode system. You may need to adjust the --cnvs-themecolor value for sufficient contrast on dark backgrounds, which is straightforward given the CSS variable approach.
Add a honeypot field — a visually hidden input that real users never fill in but bots typically do. In the PHP handler, reject submissions where that field is not empty. This approach requires no third-party service, adds no UX friction, and catches the majority of automated spam. For higher-traffic sites, combine it with a server-side rate limiter on the form endpoint.
Looking for a production-ready Bootstrap 5 HTML template? Browse Canvas Template demos and find the perfect starting point for your next project.
If you’re building with the Canvas HTML Template and want to ship production-ready Bootstrap 5 layouts faster, try Canvas Builder free — the visual builder that exports clean Canvas-ready markup in minutes.
Skip the setup — build it free
Spin up a complete Bootstrap 5 site, blog included, with Canvas Builder. No coding, no cost.
Canvas Team
Tutorials and tips for building beautiful Bootstrap 5 websites with the Canvas HTML Template and Canvas Builder.
More from the Canvas Blog