HTML | DOM Input Color type Property

The DOM Input Color type Property in HTML DOM is used for returning which type of form element containing the color picker is . This property will always return “color”.


Below Program illustrates the use of Input Color type Property.
edit close
link brightness_4 code
<!DOCTYPE html>
        HTML DOM Input Color type Property
<body style="text-align:center;">
        HTML DOM Input Color type Property 
        Select your favorite color:
        <input type="color"
    <button onclick="myGeeks()">
        Click Here!
    <p id="GFG"
    <!-- script to return
     the input color -->
        function myGeeks() {
            var x = 
              "GFG").innerHTML = x;

Before Clicking On Button:

After Clicking On Button:

Supported Browsers: The browser supported by DOM input color type property listed below:

  • Google Chrome
  • Internet Explorer 10.0 +
  • Firefox
  • Opera
  • Safari


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

Improved By : shubham_singh

Article Tags :
Practice Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.