+ 1

Help me!

What is the difference between button and input?

22nd Sep 2019, 6:23 AM
MDcode
MDcode - avatar
3 Respuestas
+ 2
I'll cite MDN (https://developer.mozilla.org/en-US/): "While <input> elements of type button are still perfectly valid HTML, the newer <button> element is now the favored way to create buttons. Given that a <button>’s label text is inserted between the opening and closing tags, you can include HTML in the label, even images." And input elements are not specific. They can have different types like text, phone number, checkbox etc.
22nd Sep 2019, 6:36 AM
Aaron Eberhardt
Aaron Eberhardt - avatar
+ 3
Thank you!) Thanks for answers!
22nd Sep 2019, 7:02 AM
MDcode
MDcode - avatar
+ 2
The <button> tag is simply just a button that is a way to get i quick and easy input from a user. Meanwhile the <input> tag displays a box for a user to type information into and being submitted with the <button>.
22nd Sep 2019, 6:39 AM
Anthony Johnson
Anthony Johnson - avatar