We help IT Professionals succeed at work.

What is the difference between  a <button> tag and a <input> tag when created

1030071002
1030071002 asked
on
What is the difference between  a <button> tag and a <input> tag when created
Comment
Watch Question

Commented:
button is just that.. its creates a button that when clicked performs a predetermined operation. Like going to a link or submitting a form.. etc. Input tags actually allow the user to provide information like a number or name.. something like that in order to perform some operation with that data.. usually :)

Author

Commented:
is there such a thing as a input tag button
Commented:
Not that I know of but you could embed the input in a button.. like so..

<button type="button">First name: 
<input type="text" name="FirstName" value="Mickey" /></button>

Open in new window

Top Expert 2013
Commented:
<input type="button" name="something" value="??">  is valid. The difference between that and <button> is that the input will send a name value pair to the server when the form is submitted.


Cd&

Explore More ContentExplore courses, solutions, and other research materials related to this topic.