What you need to know

Links move people to another URL or page section. Buttons perform an action on the current page, such as opening a dialog, submitting a form, or changing a setting. Native semantics give users familiar behavior.

How to apply it

Use an anchor with a real href for navigation and a button for actions. Keep the accessible name descriptive, preserve the browser focus indicator, and check that keyboard activation behaves as expected.

Common mistake to avoid

Do not make a clickable div or span when a native button or link fits. Custom controls require you to recreate keyboard, focus, role, and state behavior.