Jazzo.co.uk uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our Privacy Policy and our Terms & Condition.

HTML <input>

query_builder | Christopher Pisani

The HTML element <input> is the key for inputs within a form in an HTML document, with multiple combinations of input types, always using the same element. The <input> element can be used in a large variety of user inputs, from a radio button selection, tick boxes, image uploads, color picker and form controls.

We will show the variety of user inputs and types the element <input> can handle in the examples below and will use the <form> element to show results when input detects any user filled data.

For this input example, as data is sensitive, a method of POST is recommended
For this Radio example, we are using GET method as data is not sensitive
For this Check box example, we are using GET method as data is not sensitive
The colour picker
Uploading a file with the input element
An input can be set to number and an add and deduct bar is added to the input field
The range slider example

Available Attributes

Attribute Values Functionality
checked A pre selected option for a radio or check box input
min numeric value Minimum number(if used for type="number" or minimum charchters(if used for type="text")
max numeric value Maximum number(if used for type="number" or maximum charchters(if used for type="text")
step numeric value The interval between counts
type button Defines a button
type checkbox Defines a checkbox
type color Defines a colour picker
type date Defines a date control
type datetime-local Defines a date and time control
type email Defines a field for e-mail address
type file Defines a field and a Browse button for uploading files
type hidden Defines a hidden input
type image Defines an image as the submit button
type month Defines a month and year control
type number Defines a field for entering a number
type password Defines a password field
type radio Defines a radio button selection
type range Defines a slider range control
type reset Defines a reset button
type search Defines a text field for entering a search query
type submit Defines a submit button
type tel Defines a field for entering a telephone number
type text Default. Defines a single-line text field
type time Defines a control for entering a time (no timezone)
type url Defines a field for entering a URL
type week Defines a week and year control (no timezone)
value text The pre defined value for the input