Sub topic 11
Writing a Clear Call to Action
This chapter assumes you can write basic HTML and CSS. It also assumes you know what a landing page is and what a conversion is. Here you will learn how to write the call to action (CTA), build it as an accessible control, and avoid the errors that make visitors hesitate.
What a call to action does
A call to action is the single element that asks the visitor to take the next step. It is usually a button or a link styled as a button. The headline, proof, and offer all lead up to it. If the CTA is unclear, the visitor has no obvious way to act on what they just read.
A CTA has two parts that you design separately:
- The label, which is the words on the button.
- The presentation, which covers how the button looks, where it sits, and how it behaves for keyboard and screen reader users.
Placement and repetition across the page are covered in the next chapter. This chapter focuses on the CTA itself.
Write a label that names the outcome
A good label tells the visitor what happens when they click. Generic labels such as "Submit", "Click here", or "Learn more" describe the mechanics of the interface. They say nothing about the result.
Use this pattern: a verb, then the thing the visitor gets.
| Weak label | Stronger label | Why it works |
|---|---|---|
| Submit | Start your free trial | Names the offer |
| Click here | Download the pricing guide | Names the item |
| Learn more | See how invoicing works | Says what the visitor will see |
| Sign up | Create my free account | States the result and the cost |
| Get started | Book a 15-minute demo | Gives the size of the commitment |
Keep these rules in mind:
- Match the label to the offer. If the offer section says "14-day free trial", the button should say "Start your free trial", not "Join now".
- Keep it short. Two to five words is usual.
- Use one verb. "Sign up, download, and learn" asks for too much.
- Be honest about the commitment. If the button leads to a payment form, do not label it "Free".
- Use the same label every time the CTA repeats. A different label on each button makes visitors wonder whether they lead to different places.
First person or second person
Some teams write labels in the first person ("Create my account") and others in the second ("Create your account"). Neither is correct in every case. Treat this as a test candidate, not a rule, and use whichever your measurements support.
Reduce friction next to the button
The button is where visitors weigh the cost of acting. A short line of supporting text beneath it can answer the last question in their mind. This is often called microcopy.
Good microcopy states a fact about risk or effort:
- "14-day trial. No credit card required."
- "Takes about two minutes."
- "Cancel any time from your account page."
Only write claims that are true. If the trial does need a card, say so. Misleading microcopy produces sign-ups that cancel at once and erodes trust in the rest of the page.
One primary action
The page has one conversion goal, so it should have one primary CTA. Every repeat of the button uses the same label and points to the same destination.
You may offer a secondary action for visitors who are not ready, such as "Watch a 2-minute demo". If you do, make it visibly weaker than the primary button, for example a text link or an outlined button. Competing buttons of equal weight force a choice and lower the chance that any action is taken.
Build the CTA as a link or a button
Choose the HTML element by what the control does.
- Use
<a href="...">when the control takes the visitor to another page, such as a signup page. This is the case in our running example. - Use
<button>when the control performs an action on the current page, such as submitting a form.
Do not use a <div> or <span> with a click handler. These elements are not focusable by default, do not respond to the Enter or Space key, and are not announced as controls by screen readers.
Here is the CTA in context, taken from the page skeleton used in this tutorial:
<section class="hero">
<h1>Send invoices in under a minute</h1>
<p class="subhead">Example Invoice helps freelancers create, send, and track invoices without a spreadsheet.</p>
<a class="button" href="/signup" data-cta="hero">Start your free trial</a>
<p class="note">14-day trial. No credit card required.</p>
</section>The link text is plain, visible text that makes sense on its own. A screen reader user who lists all the links on the page will hear "Start your free trial", which is meaningful. A list of five links that all say "Click here" would be useless.
The data-cta attribute does not affect the visitor. It marks which placement the link belongs to so you can measure clicks later.
Style the button so it is clearly the main action
The button should stand out from the text around it and stay readable and usable for everyone.
.button {
display: inline-block;
padding: 0.75rem 1.5rem;
background: #0b5fff;
color: #ffffff;
font-weight: 600;
text-decoration: none;
border-radius: 0.375rem;
}
.button:hover {
background: #0846c2;
}
.button:focus-visible {
outline: 3px solid #111111;
outline-offset: 3px;
}Each rule has a purpose:
- Padding makes the target large enough to tap. Aim for at least 44 by 44 CSS pixels on touch screens.
- White text on the blue background gives strong contrast. WCAG, the Web Content Accessibility Guidelines, asks for a contrast ratio of at least 4.5:1 for normal text. Check your own colors with a contrast checker when you change them.
- The
:hoverrule gives feedback to mouse users. - The
:focus-visiblerule draws an outline when someone navigates with the keyboard. Never remove outlines without providing a replacement.
Color alone should not be the only thing that marks the button. Size, padding, and weight also set it apart, which helps visitors who cannot distinguish the colors.
Measure which CTA was clicked
To know whether a placement works, record each click with its position. This script reads the data-cta value:
document.querySelectorAll('[data-cta]').forEach((link) => {
link.addEventListener('click', () => {
console.log('cta_click', link.dataset.cta);
});
});Replace console.log with the event call from your analytics tool. The script does not stop the navigation, so the link still works if the script fails to load.
How the CTA connects to the rest of the page
The CTA is the end of a chain. Each earlier part of the page removes one reason not to click.
If a CTA underperforms, look upstream before rewriting the label. A button cannot fix an unclear offer or a claim with no proof.
Common errors
- Vague labels. "Submit" and "Learn more" do not say what happens next.
- A label that disagrees with the offer. The page promises a demo and the button says "Buy now".
- Low contrast. Light gray text on a pale button fails many visitors.
- Hidden focus. Removing the outline with
outline: noneand adding nothing in its place breaks keyboard use. - Click handlers on non-interactive elements. A
divthat acts as a button is invisible to assistive technology. - Hidden costs. Microcopy that leaves out a required card or a renewal fee.
- Too many equal options. Several buttons of the same weight compete.
Checklist before you ship
- The label starts with a verb and names the outcome.
- The label matches the wording of the offer.
- There is one primary CTA style, used everywhere the action repeats.
- Microcopy near the button is true and answers the last doubt.
- The element is a real
<a>or<button>. - Contrast meets 4.5:1, and a keyboard focus outline is visible.
- Each placement has a
data-ctavalue for measurement.
Exercise
A landing page offers a free 14-day trial of an invoicing tool. The hero button says "Submit" and the second button near the pricing says "Join now". Rewrite both labels, and name one HTML mistake to avoid if the button is implemented as a styled <div>.
Show answer
Use the same label on both: "Start your free trial". It begins with a verb, names the offer, and matches the wording in the offer section. Using a <div> is a mistake because it cannot be focused with the keyboard, does not respond to Enter or Space, and is not announced as a control by screen readers. Use <a href="/signup"> because the button navigates to another page.
Exercise
Your keyboard focus style is .button:focus { outline: none; } and nothing else. What goes wrong, and what should replace it?
Show answer
Keyboard users can no longer see which element has focus, so they cannot tell when the CTA is selected. Replace it with a visible outline using :focus-visible, for example outline: 3px solid #111111; outline-offset: 3px;.