Input Elements In HTML

Input Elements In HTML

What are this Input Elements ? Why we need this!!

·

3 min read

Input Elements

Input Element allows the user to input the information In web form while interacting with the webpage.

Input Element Specify an input field where the user can enter the information.

the input tags are used within form Element.

Input Works Various according to the values of its type Attribute.

< input type=" ">

Some Attributes of Input Elements

  • type : It specifies the type of an Input Element.

  • value : It specifies the value of an Input Element.

  • name : It specifies the name of an Input Element.

  • height : It specifies the height of an Input Element(Only For Image).

  • width : It specifies the width of an Input Element.

  • placeholder : It displays the text inside the input field when the Feild has no value.

  • requierd : It specifies that the Input field must be filled before submitting.

  • disabled : disabled attribute can be set to keep a user form using < input > element until some other condition has been met.

Input type

1) "text" :

< input type ="text">

define a single-line text input field. this is a default value, the text input accepts Alphanumeric characters for fields like Name, address etc.

2) "password" :

<input type="password">

defines a password field. the characters in the password field are masked.

3) "email" :

<input type="email">

This input field is used to filling email addresses. This input type has been specifically designed to validate the email address.

4) " date" :

<input type="date">

this input type is used for input fields that should contain a date. like date, month, year.

5) "checkbox" :

<input type=cheakbox">

This checkbox input is used to select more than one Number of choices.

6) "radio" :

<input type="radio">

The radio button allows user to select only one from the number of choices.

7) "color" :

<input type="color">

This is used to specify a colour Through a colour picker in supporting browsers.

8) "file" :

<input type="file">

with help of this input, we can upload requird file through local memory.

9) " range" :

<input type="range">

This Input is used to select the value From Min to Max by curser.

10) "button" :

<input type="button">

Submit Button <input type="submit">

Reset Button <input type="reset">

Button input is used for Creating a button. Which can be used for submit, reset functions.

Example using <input> Tags :