Input Tag Attributes in HTML



Input Tag Attributes

  • As in some previous tutorials, we have learned that attributes provide additional information.

  • Now we will learn the most commonly used input tag attributes:


Attributes:

i). name: This attribute is used to specify the name of the element.

<input type="text" name="text">


ii). placeholder: It represents, what type of value you can insert in the input field.

<input type="text" placeholder="Enter your name...">


iii). disabled: It is used to disable the input field from the user side.

<input type="text" disabled value="raju">


iv). valueThis attribute is used to set the initial value to the input field.

<input type="text" value="raju">


v). readonlyThis attribute is used to make readonly input field.

<input type="text" readonly value="raju">


vi). required: This specifies that the input field must be filled.

<input type="text" required>


vi). min-max: These are used to set the min and max values.

<input type="range" name="" id="" min="0" max="100">



Input Types in HTML



Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Below Post Ad

Ads Section