FrontendDeveloper.in

HTML question detail

What is the difference between `button` and `a`?

Use button for actions (open modal, submit form, toggle state). Use a for navigation to another URL.

Using the right element improves keyboard behavior and accessibility by default.

Back to all HTML questions
Get LinkedIn Premium at Rs 399