Intermediate HTML & CSS
Q77 / 100

What does the HTML "<button type=\"submit\">" versus "<button type=\"button\">" difference matter for?

Correct! Well done.

Incorrect.

The correct answer is B) A button with type="submit" inside a <form> triggers form submission when clicked, while type="button" performs no default action and is typically used with JavaScript event handlers

B

Correct Answer

A button with type="submit" inside a <form> triggers form submission when clicked, while type="button" performs no default action and is typically used with JavaScript event handlers

Explanation

Without specifying type, a <button> inside a form defaults to "submit"; explicitly using type="button" prevents accidental form submission when the button is meant only to trigger JS logic.

Progress
77/100