DEV Community


Discussion on: How to create an HTML button that acts like a link?

ricobrase profile image
Rico Brase


Use a button for actions (save, delete, edit, etc. with corresponding navigation INSIDE of your own application, e.g. navigate to the edit page), but use <a href="">Link text</a> for any sort of proper navigation, e.g. external links or internal links to separate parts of your app (user management, article management, etc.).

If you want to, you can style some links with <a href="" class="button">I'm a button!</a> and some CSS for the .button rule.

Don't change the intended behaviour of elements to make them fit - change their look!