Return to blog posts

Buttons vs. Links

Published on Thu Aug 20 2026

Time was, the question on everyone’s lips (at least, in my day job) was, “when should I use a button instead of a link?”. At the same time, “when should I use a link instead of a button?” was also the question on everyone’s lips. What follows is a brief summary of a presentation I gave to my colleagues which I hoped would answer that very question.

What are they for?

Put simply, links are for navigation. They take you to new places; a new page, a different website, or somewhere else on the page you’re looking at.

What they should look like

Buttons

What are they for?

Buttons are for actions on the page. They change something, submit something or trigger a functional change (e.g. saving forms, opening menus).

What they should look like

Common Issues

The problem: You’ve made a link look exactly like a button via CSS.

The solution: Don’t change the behaviour or semantic meaning. Links can look like buttons, but if all it does is navigate to a page, don’t force it to be a button with the role="button" attribute

The problem: You’ve used a link with a meaningless href target to act as a menu trigger.

The solution: Use a button. If a link doesn’t have a valid URL destination, it’s not a link.

Fake buttons

The problem: You’ve built a custom button using div and/or span elements because styling is a lot easier.

The solution: Build around the button element. It comes with things like keyboard support and focus states out of the box, for free.

Silent buttons

The problem: A button that changes something (e.g. expands or collapses an accordion component) doesn’t announce the state change.

The solution: Make use of good, meaningful ARIA attributes such as aria-pressed and aria-expanded

Deciding which one to use

Ask yourself:

Advice for designers

Don’t let the “look and feel” dictate the element. Tell your developers what the element does.

Advice for developers

Use semantic HTML first; build custom only if absolutely necessary, and use the correct mark-up to ensure behaviours and announcements are aligned.

Advice for product owners

Semantic HTML can lead to better SEO and a better user experience.

Takeaways

An important caveat

If styling a link to look like a button, it’s important to remember that dependent on purpose, you might not actually need attributes such as role="button". The combination of the element (the link) and the displayed text (e.g. “Get Started”) naturally informs screen readers that they’re on a link.