1. Computing

Discuss in my forum

<input type="color">

By , About.com Guide

INPUT Color Description:

The color INPUT tag gives you a way to request colors in your web form. The color type collects sRGB color with 8-bit red, green and blue components. Ideally, the browser would display a color well that allows the user to pick the exact color they want to submit.

DTD: HTML5: <!doctype html>

INPUT Color Web Browser Support:

At this time, no browser supports the INPUT color type with a color picker. Instead, they display a text box. You can still use this input type, you will just have to validate that the contents are a color with a script or CGI.

HTML Versions

INPUT Color Attributes:

Global attributes, event attributes, and the input tag attributes. Plus:

  • autocomplete
  • list

INPUT Color Usage:

Standard color input tag

<form>
<input type="color" value="rgb(128,0,0);">
</form>

See an example of a standard color input tag.

INPUT Color Special Notes:

The input color tag is not supported in any browsers if you want a color picker displayed, but you can still use this input type and validate that the submitted data is a color. That way, when browsers do start supporting it, your forms won't have to be modified.

More INPUT Color Information:

  1. About.com
  2. Computing
  3. Web Design / HTML
  4. HTML and XHTML
  5. HTML 5
  6. HTML 5 Tags
  7. The INPUT Color Tag - INPUT Color - HTML Tag for Color Pickers

©2013 About.com. All rights reserved.