Sobes.tech
Middle

What attributes does the form tag have?

sobes.tech AI

Answer from AI

Main attributes of the <form> tag:

  • action — the URL to which the form data is sent upon submission.
  • method — the HTTP method used to send data (GET or POST).
  • enctype — the encoding type of the data when sent (e.g., application/x-www-form-urlencoded, multipart/form-data for file uploads).
  • name — the name of the form, which can be used for identification.
  • target — where to open the result of the submission (_self, _blank, _parent, _top, or iframe name).
  • novalidate — disables the browser's built-in validation upon submission.
  • autocomplete — enables or disables form autofill.

Example:

<form action="/submit" method="POST" enctype="multipart/form-data" novalidate>
  <!-- form fields -->
</form>
What attributes does the form tag have? — Frontend - sobes.tech