Use of Form Controls
Use Form Controls
<Span style = "font-family: Microsoft YaHei;"> <! -- Baidu search: confident dust 2014/12/29 -->
Differences between HTML 4.01 and HTML 5
The following types are new types in HTML5: color, date, datetime, datetime-local, month, week, time, email, number, range, search, tel, and url.
Syntax
<input type="value">
Attribute Value
| Value |
Description |
| Button |
Define clickable buttons (mostly used with JavaScript to start the script) |
| Checkbox |
Define check boxes. |
| Color |
Define the color picker. |
| Date |
Define the Date Field (with the calendar Control) |
| Datetime |
Define the Date Field (with the calendar and time controls) |
| Datetime-local |
Define the Date Field (with the calendar and time controls) |
| Month |
Define the month of the date field (with the calendar Control) |
| Week |
Defines the week of the Date Field (with the calendar Control) |
| Time |
Defines the time, minute, and second of the date field (with the time control) |
| Email |
Define text fields for the E-mail Address |
| File |
Define the input field and the "Browse..." button for File Upload |
| Hidden |
Define hidden input fields |
| Image |
Define image as submit button |
| Number |
Define a numeric field with a spinner Control |
| Password |
Define the password field. Characters in the field will be masked. |
| Radio |
Define the radio button. |
| Range |
Defines the numeric fields with the slider control. |
| Reset |
Define the reset button. The reset button resets all form fields to their initial values. |
| Search |
Defines text fields used for search. |
| Submit |
Define the submit button. The submit button sends data to the server. |
| Tel |
Defines text fields used for phone numbers. |
| Text |
Default value. Defines the single-line input field. You can enter text in it. The default value is 20 characters. |
| Url |
Defines the text fields used for URLs. |