Common practice is for links to use the
a element, and buttons to use the
Since you tagged this with
accessibility, I'm answering from that perspective.
A link is for navigation and implies the browser's "back" button will take you back to the previous page.
A button is for actions, such as "add to cart" (which is actually an interesting case since most "add to cart" buttons, while they do add the product to the cart, they sometimes take you to the cart too so they perform an action and navigate you. But using the browser's "back" button does not remove the product from the cart. That's usually a separate button).
So from an accessibility perspective, when a screen reader user hears "button", they'll expect to perform some action and the browser's "back" button does not come into play. If they want to undo that action, they'll need a different button.
When a screen reader user hears "link", they'll expect to be navigated to another page and they'll expect the browser's "back" button to take them back to the previous page (unless the page opens in a new tab, which is a separate accessibility consideration).
Yes, but it depends on how you've set up your buttons.
TL;DR: since most buttons in CSS libraries are actually
button elements and a good number of new single page applications use ReactJS and subsequently React Router, you can say that the buttons used to navigate using react-router are behaving like links, since they use the History API.
See, historically, almost all buttons were actually
a tags with a lot of styling to give them the required look. The problem with using
a tags is when you try to use them as buttons instead of as links. Since a button doesn't necessarily need to link to anything but can perform an action. Well if you skip setting the
href attribute in an
a tag, fun can be had. This is why you'll notice that some buttons add
# to the link, this was to stop the fun that was experienced when you left out the
Now, most CSS libraries have transitioned to using the
button element most probably to avoid all the fun that occurs with using
a elements as buttons.