Submitting a form. BUTTON or INPUT

Hi,

Is there a strong consensus on the best way to submit a form:

<input type="submit">
or
<button type="submit">

Semantics tells me to use BUTTON, but Adrian Roselli in 2016 (eight years—shrug) erred toward INPUT in the first instance:
https://adrianroselli.com/2016/01/links-buttons-submits-and-divs-oh-hell.html#comment-41035

BUTTON seemed to slightly win the debate here:
https://stackoverflow.com/questions/7117639/input-type-submit-vs-button-tag-are-they-interchangeable

I would love to strongly advocate for BUTTON, because semantics and HTML5 and the BUTTON element exists, but would like to see more evidence that would be the right thing to do.

Thanks in advance.

Regards,

Alan

. . . . -   . . - - -
Alan Bristow ( he / him / il )
Web Developer / Développeur Web
Elections Canada / Élections Canada
alan.bristow@elections.ca<mailto:alan.bristow@elections.ca>

Received on Thursday, 1 February 2024 19:19:47 UTC