Does the <button> tag default to type="Submit"?

Asked

Viewed 21 times

0

If I use:

<button>Enviar</button>

is the same as using the form below?

<button type=“submit”>Enviar</button>

In other words, if I use a tag <button> without defining the attribute type, there is a default value for the type defined by the browser at render time?

  • 1

    Thiago, note Renan’s comment on the answer: https://answall.com/a/12289/8063... the default type of the button is Submit. However, it only has "Submit" effect when it is inside a form. Outside of the form it works like any button.

  • Thanks @Sam, hadn’t seen his comment.

  • Quiet! : D Your question is mt good, because mts still do not know how the button works, but already have answers that clarify the doubt. Abs!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.