HTML CSS examples for HTML Tag:input
The color type of input element is to select a color.
Color values are expressed as exactly seven characters: a leading #, followed by three two-digit hexadecimal values representing the red, green, and blue values, for example, #FF1234.
Using the color Type of the input Element
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <form method="post" action="http://example.com/form"> <p> <label for="name"> Name: <!--from w ww .j av a2 s. co m--> <input value="java2s.com" id="name" name="name"> </label> </p> <p> <label for="fave"> Favorite Fruit: <input type="text" id="fave" name="fave"> </label> </p> <p> <label for="color"> Color: <input type="color" id="color" name="color"> </label> </p> <input type="submit" value="Submit Vote"> </form> </body> </html>