Text Fields
<input type="text" /> defines a one-line input field that a user can enter text into:
<form> |
Note: The form itself is not visible. Also note that the default width of a text field is 20 characters.
Password Field
<input type="password" /> defines a password field:
<form> |
Note: The characters in a password field are masked (shown as asterisks or circles).
Radio Buttons
<input type="radio" /> defines a radio button. Radio buttons let a user select ONLY ONE one of a limited number of choices:
<form> |
Checkboxes
<input type="checkbox" /> defines a checkbox. Checkboxes let a user select ONE or MORE options of a limited number of choices.
<form> |
How the HTML code above looks in a browser:
Submit Button
<input type="submit" /> defines a submit button.
A submit button is used to send form data to a server. The data is sent to the page specified in the form's action attribute. The file defined in the action attribute usually does something with the received input:
<form
name="input" action="html_form_action.asp"
method="get"> |
How the HTML code above looks in a browser:
If you type some characters in the text field above, and click the "Submit" button, the browser will send your input to a page called "html_form_action.asp". The page will show you the received input.
HTML Form Tags
Tag |
Description |
Defines an HTML form for user input |
|
Defines an input control |
|
Defines a multi-line text input control |
|
Defines a label for an input element |
|
Defines a border around elements in a form |
|
Defines a caption for a fieldset element |
|
Defines a select list (drop-down list) |
|
Defines a group of related options in a select list |
|
Defines an option in a select list |
|
Defines a push button |
This free website was made using Yola.
No HTML skills required. Build your website in minutes.
Go to www.yola.com and sign up today!
Make a free website with Yola