Example

A simple <input> tag with color attribute:

Laboratory

description & Usage

The <input type="color"> attribute displays a color picker.

Its default value is #000000 (black color).

For the value, we must use HexDecimal with 6 characters plus a # character.

Notes

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
<input type="color">

Syntax

Attribute Values

Values Description