WikiGalaxy

Personalize

HTML Form Attributes

Introduction:

HTML form attributes define additional settings or behaviors for form elements, enhancing user interaction and data submission. These attributes are added directly within the <form> tag to control validation, target actions, and more.

Action Attribute

Defines the URL where form data is sent after submission.


    <form action="/submit-form" method="post">
      <input type="text" name="username">
      <button type="submit">Submit</button>
    </form>
  

Method Attribute

Specifies the HTTP method used when sending form data.


    <form action="/submit-form" method="get">
      <input type="email" name="email">
      <button type="submit">Submit</button>
    </form>
  

Target Attribute

Determines where to display the response after form submission.


    <form action="/submit-form" target="_blank">
      <input type="text" name="name">
      <button type="submit">Submit</button>
    </form>
  

Autocomplete Attribute

Enables or disables automatic form field completion.


    <form action="/submit-form" autocomplete="on">
      <input type="password" name="password">
      <button type="submit">Submit</button>
    </form>
  

Novalidate Attribute

Disables form validation when the form is submitted.


    <form action="/submit-form" novalidate>
      <input type="text" name="phone">
      <button type="submit">Submit</button>
    </form>
  
logo of wikigalaxy

Newsletter

Subscribe to our newsletter for weekly updates and promotions.

Privacy Policy

 • 

Terms of Service

Copyright © WikiGalaxy 2025