HTML5 > Forms Elements

Color picker in HTML5

How to give option to the user to select a color in HTML5?


To give option to the user to select a color on the webpage we can set the input type attribute to “color”.

<body>
    <form>
       Color: <input type="color" id="myColor" name="myColor" />
    </form>
</body>

Output

Clicking on the Color box, opens up few  color by default, we want to see the advance color mixer, we can click on "Other..." button and mix color to get our desired color code.

 Views: 5191 | Post Order: 93



Write for us






Hosting Recommendations