HTML5 new input types for forms

HTML5 gives us data-specific user Interface (UI) elements and data validation.
There 13 new types in all:


HTML5 email address type field

The email type supports one or more email addresses separated by commas. The default for this field is multiple.

It also provides excellent mobile support by displaying a keyboard optimized for email entry when this field in focus. Primary the shortcut key for the @ (at) is displayed.  Again, like with the others, this support does depend on device and browser. Read More


HMTL5 search field type

The search input type provides a search field. The specification states:

The difference between the text state and the search state is primary stylistic. On platforms where search field are distinguished from regular text fields, the search state might result in an appearance consistent with the platform’s search fields rather than appearing like a regular text field.

Read More


HTML5 color input type

The color input type does not have a a lot of support yet.  If you use this input type=”color” it will restrict the the input to a hexadecimal RGB color format in most browsers.  It does give you a nice color picker in the Opera browser.

HTML5 color selector input field

HTML5 color selector Opera Browser

Webkit does support the input type, but no color picker.

<form id="clrhtml5" method="post">
<label  for="clr">select a color</label>
<input type="color" id="clr" name="clr" placeholder="#990000"><br>
<input type="submit" value="favorite color">
</form>

HTML5 URL input form field

The URL input field is used for a web address.  If you use the new type=”url”  when the field is in focus on a mobile devise the on screen keyboard will be optimized for web address entry by displaying the the .com and forward slash short cut keys.

In Opera, Firefox, and Webkit there is support for pattern checking. Mind you it very basic checking and is only looking for .(dot) something. In example:  not://www.notareal.url  will pass the check. Read More


Copyright © Jason Huber .net
This site is mobile ready. How about you?