Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save junaidtk/596c53ad5d60d795a31daf5a87b38e6d to your computer and use it in GitHub Desktop.
Save junaidtk/596c53ad5d60d795a31daf5a87b38e6d to your computer and use it in GitHub Desktop.
Use of <button type="submit"> and <input type="submit">
The form can be submitted to the browser by using button and input tag.
But we need to know which one is better for the form.
Diffrence between the <button type="submit"> and <input type="submit"> is, Input type can hold only specified text inside the value attribute.
But the <button type="submit"></button> can hold any type of data, can add html content in the button tag,
The button type is newer than input, so some older browser (eg: IE 6 ) dosn't support this tag.
In almost all modern browser will support button.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment