i

Learn HTML and CSS in 10 Days

Other Inputs

Apart from the applications that we went through above, the element comes with a couple of other use cases. They are passing hidden data and attaching files during form processing.

Hidden Input

Hidden input offers a technique to pass the info to the server of the website without it getting shown to the users. They are generally used for tracking keys, codes, or other info that isn't relevant to the client; however, it is useful when preparing the form. You can get this info from the source code.

To set up a hidden input, ‘type’ attribute value is provided by the ‘hidden’ value. In addition to that include an appropriate ‘value’ and ‘name’ to the attributes.

File Input

To provide the user to add up a file to the form in the website, the ‘type’ attribute value is made to ‘file’.