HTML Input

Input Box
Input is the input box on the form that allows the user to enter a string in one line. To create an input box, HTML provides <input> tag and utilize attribute TYPE = "Text".
Another attribute of <input> tag is NAME to declare the name of the input, the VALUE to declare the value of an input, and SIZE to declare the length of an input.
If you wish for what is typed by the user are hidden by just displaying the character *, then you can replace the TYPE attribute to "Password".  
<TITLE> input.htm </ TITLE>
</ HEAD>
<TD> Name: </ TD>
<TD> <INPUT TYPE = "Text" NAME = "varName" VALUE = "John"
SIZE = "15"> </ TD>
</ TR>
<TD> Address: </ TD>
<INPUT TYPE="Text" NAME="varAddress" SIZE="30"> </ TD>
</ TR>
<TD> Password: </ TD>
<INPUT <TD> TYPE="Password" NAME="varPassword" SIZE="10"> </ TD>
</ FORM>
</ BODY>

Radio Button
If the attribute TYPE in your <input> replace with "Radio" then you already defines a radio button. Try adding the following line in input.htm.
<input checked TYPE="Radio" NAME="gender" VALUE="male"> Male
<input TYPE="Radio" NAME="gender" VALUE="female"> Female

You'll find that on the radio button input type attributes are checked. This attribute indicates that the radio button is activated. In the radio buttons you can only activate one at a time.
Checked Box
Unlike radio buttons allow the user to choose only one option, the input type checked the box you can select one or several options, or not vote at all. This option is typically used to enter data that is optional. You can use the "Checkbox" on <input> attribute.


Post a Comment