This input type is used for input fields that should contain a color:
Depending on browser support, a pop-up color picker appears when you enter the input field.
HTML file: | Displayed by browser: |
---|---|
<form action="http://www.w3schools.com/html/action_page.php">
Select your favorite color: <input type="color" name="favcolor" value="#ff0000"> <input type="submit"> </form> |
Only Chrome, Firefox and Opera browsers will display this correctly (as of September 2015). It is not supported by Internet Explorer or Safari.