HTML Input Attributes

We have a lot of HTML Input Attributes controls, such as text box, drop-down, check box, and radio button , that help the user to enter the information. We can  create these controls by using the INPUT element.


<INPUT type=”text”>

Following are the types of the INPUT elements.

  • text and Search
  • tel
  • url
  • email
  • password
  • datetime-local
  • datetime, date, month, week , and time
  • number and range
  • file
  • hidden
  • checkbox
  • radio
  • submit
  • reset

We have a list of HTML Input Attributes : –

Attributes                       Description                            
disabled        Implies that the drop-down list is disabled
name            Refers to the name of the drop-down list
size            Refers to the number of visible options shown  
                in the drop-down list
autofocus       Allows the button control to get the focus as 
                soon as the page loads.
form            Refers to the id of the FORM
multiple        Specifies that the multiple items can be    
                selected from the drop-down list.                                         

Example of Data List Element :-



<HEAD><TITLE>Data List Element</TITLE>


<input type=”text” list=”name”>
<datalist id=”name”>
<option value=”John”>
<option value=”Jazzy”>
<option value=”Mickel”>






HTML Input Attributes, Example of Form Elements :-


<title>Untitled Document</title>
Enter Your name:<input type=”text” name=”username”><br/>
Enter Password:<input type=”password” name=”pass”><br/>
Enter your three digit code number:<input type=”text” name=”username” size=”3″ maxlength=”3″>

Example of form Elements

Follow Us

Contact Us

Back to Top