

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use input type field with the color picker in HTML?
The <input type="color"> is for input fields with color. It will allow you to select a color from color picker.
A color picker will be visible when you will click on the default color box. Here, you can set the default color also with the value attribute −
Example
You can try to run the following code to show a color picker with input type color −
<!DOCTYPE html> <html> <head> <title>HTML input color</title> </head> <body> <form action = "" method = "get"> Select which color you want for your website:<br><br> <input type="color" name="favcolor" value="#FFFFF"><br> <input type="submit" value="submit"> </form> </body> </html>
- Related Questions & Answers
- How to use input type field with date field in HTML?
- How to use input type field with steps in HTML?
- HTML DOM Input Color type Property
- How to use range input type in HTML?
- How to use month input type in HTML?
- How to use time input type in HTML?
- How to use datetime input type in HTML?
- How to use email input type in HTML?
- How to use search input type in HTML?
- How to use telephone input type in HTML?
- How to use URL input type in HTML?
- How to use week input type in HTML?
- How to use year input type in HTML?
- How to Create a Color Picker using HTML, CSS, and JavaScript?
- How to Create a Color Picker in ReactJS?
Advertisements