What's the difference between <input type="submit"`and <input type="button">

What’s the difference between <input type="submit">and <input type="button">

i believe submit makes it clickable while typr button is what it is in this case a button.

1 Like

From what I have learned it is to do with the form.

The <input type="submit"> will submit the form. (To remember this, you submit the form)

The <input type="button" /> does not. Instead, it works with Javascript. For example, you press this kind of button and it will activate a JS function that will make a <div>'s background colour goes red.

Hopefully, this has helped? :slight_smile:

1 Like