Input Examples

This file contains a number of examples of the different form inputs available in HTML/HTML5. Each form responds to a submit button and should alert the input it received. The examples on this page are designed for the Chrome browser but it might be interesting to see how their behavior changes in other browsers.

Base HTML Input Elements

These are the basic forms of user input elements in HTML, listed here. Throughout this file I use a different style of form input handling so be sure to view the source.

Text Field:
Password Field:
Radio Buttons: Option A Option B Option C Option D Option E
Check Boxes: Option 1 Option 2 Option 3 Option 4 Option 5

HTML5 Input Elements

These are all of the input fields listed here along with examples showing you how their return values are formated. While some of these may look similar to the default input fields notice how their behavior changes if you view this page in a mobile browser.

Color:
Date:
Datetime: *Datetime is currently not supported by Chrome, notice what it defaults to in this case. It is supported by Opera and Safari if you want to see working behavior.
Datetime-local:
E-mail:
Month:
Number:
Range:
Tel (telephone): *Tel is not currently supported by any of the major browsers.
Time:
URL (web address): *You may need to include the "http://" for it to accept
Week: