Usage
Input tag is used to specify input fields in which user can specify the data.
The accept is used to specify type of the file should accept.
The align attribute is used to align the buttons as per need.
The alt attribute can be used only with image and alternate text for image.
The checked attribute can be used to check box and by default we can mark option selected.
The disabled attribute is used to disable the input text box.
The maxlength attribute can be used to set maximum letters accepted by input text box.
The name atribute is used to specify name of the input text box.
The readonly atribute is used to specify test box as read only, cannot modify it.
The size attribute is used to specify the visible width.
The src is used to specify source url path.
The tabindex is used to specify which input tab should selected to get input from user.
The type is used to specify type of the element to be displayed.
The value is used to specify the value of the text box.
|
<html>
<body>
<form action="demo_form.asp">
First name: <input type="text" name="FirstName" value="First name" disabled tabindex="2"><br>
Last name: <input type="text" name="LastName" maxlength="10" width="70" value="Last name" tabindex="1"><br>
<input type="file" name="pic" accept="image/*" ><br>
<input type="submit" align="right" value="Submit" ><br>
<input type="image" src="submit.gif" alt="Submit" ><br>
<input type="checkbox" name="accept" value="terms" checked> I will accept terms<br>
Country: <input type="text" name="country" value="India" readonly><br>
</form>
</body>
</html>
|