HTML input type Attribute

HTML Input Type Attribute


HTML <input> type Attribute

demo:- < input type=”text” >

The HTML <input> kind Attribute is employed to specify the sort of <input> part to show. The default form of <input> kind attribute is text.

Attribute Values Table:-

Values description
button it’s wont to outline a clickable Button in an exceedingly Document. it’s largely used with JavaScript to activate the script.
checkbox it’s wont to outline a checkbox field. The checkbox is shown as an sq. box that’s ticked once it’s activated. It permits the user to pick out one or a lot of possibilities among all the restricted selections.
color it’s wont to outline a color picker. the worth ought to be a seven-character sexadecimal notation. Its default worth is #000000(black).
date it’s wont to outline a date picker or management field. the worth is the year, month, and day.
email it’s wont to outline a field for the email address. The input email id is mechanically valid to examine the format of the e-mail id is correct or not.
file it’s wont to specify the file choose field and add a button to settle on a file for transfer to the shape.
hidden it’s wont to outline Associate in Nursing input hidden field. A hidden field additionally includes that knowledge that might not be seen or changed by the users once submitted the shape. A hidden field solely stores those information records that require to be updated once submitting the shape.
image it’s wont to outline a picture because of the submit button.
month it’s wont to specify the management of month and year field. the worth should be within the format of “YYYY-MM”.
number it’s wont to specify Associate in Nursing input field for coming into the variety.
password it’s wont to specify the secret field of the input tag. secret ought to be served over the HTTPS pages as a result of it embrace the sensitive data of the user.
radio it’s wont to outline a Radio Button. Radio Buttons are wont to let the user choose precisely one possibility from an inventory of predefined choices. Radio Button input controls are created by mistreatment of the “input” part with a sort attribute having worth as “radio”.
range it’s wont to outline management for variety entered by the user. It will set restrictions on the unimportant range or worth that is able to be entered by the user. Its default varies from zero to one hundred.
reset it’s wont to defines a push button. The push-button is employed to reset all the shape values to their initial values.
search it’s wont to outline a text field that entered a research string.
submit it’s wont to outline a submit button. it’s wont to submit all the user worth to the shape handler. the shape Handler may be a server page that activates a script to process all the input values.
tel it’s wont to outline a field that coming into a user signaling. text: it’s wont to outline a single-line text field. The default breadth of the text field is twenty characters.
time it’s wont to specify the coming into time management field.
URL it’s wont to outline a field that entered a computer address. This input worth is mechanically valid before submitting the shape.
week it’s wont to outline per week and a year management field.

Example:-

<!DOCTYPE html> 
<html> 
  
<head> 
    <title> 
        HTML input type Attribute 
    </title> 
</head> 
      
<body> 
  
    <h1 style="color:#000;">Myprograming</h1> 
          
    <h3>HTML < input > type Attribute</h3> 
          
    <form action="#" method="get"> 
        Username: <input type="text" name="name"> 
              
        <br><br> 
              
        Password: <input type="password" name="pass"> 
              
        <br><br> 
              
        <button type="submit" value="submit"> 
            Submit 
        </button> 
              
        <button type="reset" value="reset"> 
            Reset 
        </button> 
    </form> 
</body> 
  
</html>

Output:-


HTML input type Attribute
HTML input type Attribute

  • Supported Browsers:
    • Google Chrome
    • Internet Explorer
    • Firefox
    • Safari
    • Opera

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *