Why are button’s discouraged from navigation?

After reading up on multiple documents posted in the comments, it seems that there is actually a clear factual reason buttons are not used in navigation bars.

Anchor tags

These are used when there is a page redirect or taking a user elsewhere on the website.

  • If it navigates, it is a link. Use link markup with a valid hypertext reference

~Links are not buttons

Button elements

These are used when you want to doSomething() that is not redirecting the user. I.e. submitting a form / etc.


The question you need to ask yourself is:

Will this control be used to initiate an immediate action or Is the action to navigate to another page?

if the answer to your question is the first part, then you should be using a button element. Whereas if it is the latter that you are wishing to do, then you should be using an a element.

further Reading:

Leave a Comment