HTML Input Control Elements Color

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

5
<input type="color" name="favcolor" value="#ff0000">

In supporting browsers, the input element with a type attribute whose value is color creates a button-like control, with a color equal to the value of color attribute (defaults to black if value is not specified or is an invalid hexadecimal format).

enter image description here

Clicking this button opens the operating system's color widget, which allows user to select a color.

enter image description here

Fallback for browsers which do not support this input type is a regular input type=text.

enter image description here



Got any HTML Question?