|
..... |
|
![]() |
|||||||
HTML Forms are used to select different kinds of user input.
Text: This is used to create single-line text boxes. The syntax to create a text box is: <input type="text" name="text1"> Example:
How the HTML code above looks in a browser: First name: Last name: Password: This is also a text box but it is a "*" type.The syntax to create a password field is <input type="password" name="password> Example:
Browser Support
The Form tags are supported in all major browsers
How the HTML code above looks in a browser: Textarea: This option includes rows and cols attributes, which specify the number of lines and character hold in the text box. The syntax to create a Textarea field is <textarea rows=4 cols=30 name="textarea"> Checkbox: This option is used to select more than one option. The syntax to create a Checkbox field is <input type="checkbox" name="checkbox" value="HTML"> Example:
How the HTML code above looks in a browser: Previous Next |
![]() |