Previous technique
Next technique

link or button?

WCAG 2.2
A
#links#buttons

Here is a little method to decide if you need a link or a button:

If it takes the user to a new location, it’s a link. I can be either another page or even another area of the same page. Then it is a link. A link can look like a button but it must be coded as a link.

<a href="" class="button">I take you somewhere else</a>

if it does something, it’s a button. Buttons cause an action that happens on the same page like submitting a form, opening a menu or a modal, expanding details. A button can look like a link, but it must be coded as a button.

<button class="link">show me some detail</button>
Source of this technique  Opens in a new window

Learn more about the related success criteria: