In HTML forms, there are two
common ways to create submission
buttons <input type="submit">
and
<button type="submit">
.
Both type of buttons will
have the default behaviour
of submitting the form data
when they are clicked.
However, there are small
differences we need to be aware of.
Let us have a look at an example:
As can be seen from the example,
we cannot add any content
in the input element because it
does not have a closing tag.
But, in the button element
with type="submit"
,
we are free to add text,
images or even other HTML elements.