22. What is the difference between button types?
A button inside a form defaults to submit behavior in common HTML usage unless another type is specified. type="submit" submits the form, type="button" is a generic action button, and type="reset" resets form controls to their initial values.
Key Takeaways
Explicitly specify button types when clarity matters.
Use button for actions rather than clickable div elements.
Knowledge Check
Which button type prevents a button from acting as a form submitter?