Every Website has a login and sign up page so to make this form we need tag Form, to create awesome forms. To create any login and sign up page you need inputs from the users like name, email id, and password of the users.

So for that purpose, we need Form Element

Below are the attributes of Form

action:- This attribute points the page which will call when some click on the submit button.

autocomplete: Enables the autocomplete feature in a form.

method: There is two type of method get and post. get is not secure while the post is secure.

name: it holds the name of the form.

target: Opens the action URL in the specified target, such as in the same window, in a new window, or in a new tab.

HTML Form Input Element :-

There are also various types of attributes for the input of forms.

Example of Input:-


<HEAD><TITLE>Input tag in a form</TITLE>



Enter your name: <input>




HTML Form Input Element, we can add the following fields on a form:-

  • Text:- text attribute is used to define the input type text. If we want that given input field should take text as an input. We can write it as <input type=”text” />
  • Password:- password is used when we want to hide the original input given by the user in the form field. hiding means instead of original text it should show star. We can write it as <input type=”password” />
  • Hidden: Hidden is used to hiding the data from the front end user.
  • Checkbox: We can use a checkbox when we want to add checkbox feature on our webpage.
  • Radio: Radio is used when we want to add radio button on our webpage
  • Submit: Submit is use to create a submit button. This is a final step of form submission. On submit it will redirect to the address written in the action tab.