Easy Guide: How to add a Click-to-Call HTML Button

html button link
Table of Contents

Core HTML for Click-to-Call:

Click to call html most straight forward method.  Add the tel: attribute to the <a> tag, followed by the phone number you want to link to.

The basic HTML code to create a click-to-call button is:

				
					<a href="tel:+1234567890">Call Us</a>
				
			

Replace +1234567890 with your actual phone number, including the country code.

The tel: part of the href attribute tells the browser to initiate a phone call when the link is clicked. You can customize the appearance of the button using CSS.

Using JavaScript for html buttons:

You can create a click event listener for the button and use JavaScript to trigger a call.

				
					<button id="call-button">Click to Call</button>

<script>
  const callButton = document.getElementById('call-button');

  callButton.addEventListener('click', () => {
    const phoneNumber = '+1234567890';
    window.location.href = `tel:${phoneNumber}`;
  });
</script>
				
			

Platform-Specific Instructions for HTML Buttons

 

1. WordPress

Using a Plugin: 

The easiest way is to use a plugin like “Call Now Button” or a similar one. Install and activate the plugin, then configure its settings (button text, phone number, appearance) through the plugin’s interface.

Manually Adding (click to call html) to a Page/Post:

  • In the WordPress editor, switch to the “Text” or “Code” view.
  • Paste the core HTML code where you want the button to appear.
  • Save or update the page/post.

Manually Adding with the HTML Element:

  • Add an “HTML Code” element to your page.
  • Paste the core HTML code into the element’s settings.
  • Adjust the element’s position and styling as needed.
 
Adding to a Widget Area:
  • Go to Appearance > Widgets.
  • Add a “Custom HTML” widget to the desired widget area.
  • Paste the core HTML code into the widget.
  • Save the widget.
2. Wix

Using the Wix App Market: Search for and add a “Click to Call” or similar app from the Wix App Market. Configure the app settings to customize the button.

Manually Adding with the HTML Element:

  • Add an “HTML Code” element to your page.
  • Paste the core HTML code into the element’s settings.
  • Adjust the element’s position and styling as needed.
3. Webflow

Adding a (html click to call) Link:

  • Add a text link or button element to your page.
  • In the link settings, set the URL to tel:+1234567890 (replace with your number).
  • Style the link or button as desired.
4. Squarespace

Using a “Code” block to your page.

  • Add a “Code” block to your page.
  • Paste the core HTML code into the block.
  • You may need to disable “Display Source” in the block settings to show the button instead of the code.
 

Using a Button Block with Custom CSS:

  • Add a “Button” block.
  • In the button settings, add a link to tel:+1234567890.
  • Use custom CSS to style the button as a click-to-call button (e.g., adding a phone icon).
5. Shopify

Editing Theme Code:

  • In your Shopify admin, go to Online Store > Themes.
  • Find the theme you’re using and click “Actions” > “Edit code.”
  • Locate the appropriate template file where you want to add the button (e.g., header.liquid, product.liquid).
  • Paste the core HTML code into the file.
  • Save the changes.

Using a Shopify App: 

Consider using a Shopify app that provides click-to-call functionality if you’re not comfortable editing theme code.

Important Considerations:

  • Mobile Optimization: Ensure the (html call button) button is easily clickable on mobile devices.
  • Accessibility: Use clear button text and consider adding an ARIA label for screen readers (aria-label=”Call us”).
  • Testing: Always test the button on different devices and browsers to ensure it works as expected.

Remember, specific instructions might vary slightly depending on the platform version and any custom themes or templates you’re using. Consult the platform’s official documentation or support resources if you encounter any issues.

Other Calls to Action With HTML

You can add other calls to action such as email, messaging, fax, and more. Other HTML5 protocols include: 

  • tel: – place a phone call
  • mailto: – open an email app
  • callto: open Skype
  • sms: – send a text message
  • fax: – send a fax

 

Reference: Brown, R. (September 16, 2022). “Telephone Links: How to Add “Call-able” Links & CTA’s to Your Website” Elegant Themes. 

Let’s start talking

Book A Quick 15 Minute Call,
And We’ll Show You How To Unlock The Power Of Every Conversation.

Free Trial