the following:
is infact:number
input is as much as step attr value is set.
range
input is much more like a number
input with different representation and semantic meaning.
it looks as follows:
range
& number
step mission is to determine the stepping value.if it is integer or a decimal point number.hence, will decied if the user can provide decimal point numbers or not. min mission is to decide the minimum value.stepping will start from that value.it could be integer or a decimal point number.hence,whatever is min value.step will start increasing or conceding from that value max mission is to decied the maximum value.
this widget is hidden.think of it as input box that users will never see and use.what is the point then?.hidden input element value
attr is used to hold a value that will be used later.all this work is outside of the user experince or scope of service.below this line there is input element of type hidden:
obvious that as a user i can not visualize any element above this line.however,using web dev tools i can toogle it.usual use case is to hold a address of data location in a database and refer back to it again when submiting again (good reason to be hidden as users do not need to know that).
the user may want or asked to provide any type of file.file
widget let him upload like so:
multiple
attr is used to allow multiple files upload.
accept
attr is used to determine the type of file sent to the server.the value could be a comma seperated list of file types.
browsers and platforms that support color wheels to pick colors are infact internaly converting the selected color into it's hexadecimal notation.therefore html color input only accept color inputs from users in the form of hexadecimal notaion.in case of unrecognized input format such as using css color functions or any value other than hexadecimal notation of colors.browsers will default to "#000000" color wich is black.
checkbox
might look as follows:
the checkbox has no value taken from the user.therefore there is no validation taking place.value
attr is set and will be sent on submission along with name
attr.user only decieds if it is checked to be sent or not.it is boolean.
checked
attr is used to have on of the multiple checkboxes to be selected by default.
radio technicaly is similar to checkbox
with big semantic difference that radio
input is used when we have multiple options and user can select only one.
it looks as follows:
attributes min,max and value
are filled in with the form of yyyy-mm-dd.however date is displayed differently depending on the used browser or operating system-could.it could be displayed as yyyy-dd-mm or mm-dd-yyyy and so on.step
attribute is used to navigate through dates.user might want to navigate dates throughout sundays only.therefore i need to set step
to "7".
date
.however select
form element is used to get date user inputs like so:
another soution form browsers that are not supporting date
input and are fallicg back to text
input is the use of pattern
attr.validation is performed to make sure user input is in a form of yyyy-mm-dd.however users still can exchange mm with dd-in the end they are only numbers.infact date is a number input type with speacial treatments and this is noticed with the use of min,max and step
attr
datetime-locale
it will look as follows:
a date and time picker will be used if the browser supports datetime
input.not supporting will cause the browser to degrade to text
input as a fallback.hence pattern
attr is used as a validation.but as said earlier users still able to submit invalid data as dd could be submited as mm.as a typical solution select
from element is used for each date,time and timezone input data.
month week time
input types month, week, time
date,datetime-locale
is solved using select
form element.infact as a rule-a general one.all date and time related input types(date, time,datetime-locale,month and week
) share the same solution in non-supporting browsers.also they share the same validation rules using min,max and step
of course if they are used in a supporting browser.
simple button that does something when user clicks on it.button
from element is prefered on this sort of button since type="button"
element has no ending tag(closing).hence no html is included inside.
it might look as follows:
input type="button" value="send file" name="button" id="doc"
submit button when clicked sendes form's data to the action
specified url
destination for processing at the server.
it looks as follow:
is a submit button that looks exactly as img
element with data submission ability.
it looks as follow:
is a reset button that resets from elements values to their default values.
it looks as a simple reset button:
text attributes including text,search,email,tel url and password
have text-only common attributes.i can think of every single line text input type is of type="text" with special treatment.the attributes are:
input of type email might look as follow:
pattern
attr can be used for browser validation.
input of type password might look as follow:
pattern
attr can be used for browser validation.
input of type search might look as follows:
input of type tel might look as follows:
input of type text is the father of all single line text input types.it might look as follows:
Note:
input of type text is the fallback if one of the type
attr is not supported in older browsers.
input of type URL might look exactly as any single line text input.
pattern
attr can be used for browser validation