Tags & Forms

Hi Devs,

Hope you all guys know or written some script in html in past. Here I am going to brief about html forms & tags.

Forms is one of the most important things in web application which almost use in every websites, Basically when we take an Input from user most probably we use the form. I am pretty sure that you have made an google account. To fill the your detail in box and hit the submit these all are comes under the forms.

Here I am going to discuss the Ideal form tags which is used in production.

Input tags <input /> Offcourse there are a different attribute of input tag which behaves differently in user page but goal of allattribute is to collect the user data in efficient and easy way.

Tags <tags /> or <tags></tags>

  1. Type text <input type="text" /> this will accept the string data.

  2. Type password <input type="password" /> this will accept the string but mask it with •••••• rather than text.

  3. Type number <input type="number" /> this will accept only numeric value in this field.

  4. Type email <input type="email" /> this will accept the email type value by default html will give you the warning if your entered data is not an email. One other benefits of using the type email it will enable the @ or .com in your mobile keyboard just left to the space-bar.

  5. Type submit <input type="submit" /> this will give you the button to submit the form to back-end server.

  6. Type checkbox <input type="checkbox"/> this will give you the checkbox.
  7. Type hidden <input type="hidden" /> this will not appear on the page but it will be present in your forms.

  8. Type radio <input type="radio"/> radio buttons usually used for the the single selection between the give option.

  9. Type color <input type="color" /> this will give you the color picker on your web-page.

  10. Type file <input type="file" /> to upload a file this tag is gonna to use.

  11. Type range <input type="range" /> this will give you option to select between range.

  12. Type search <input type="search" /> this will give you the input string value but it provides you to the 'x' button to clear out the text you entered.

Forms Types Basically there are two kinds of form methods 'GET' & 'POST'.

#GET

Get methods use to submit all your data in url encoded format. It means it will send the user data by url of the page. This considered as a vulnerable.

<form method="GET">...</form>

#POST This is consider as a secured because it use multipart encoding for binary data.

<form method="POST">...</form>

These are the some important input tags which widely used in webs.