Home › HTML Tutorial › Input types
Input types
Pick the right control for the data.
Types like date, number, range and color give people native pickers, and validate on mobile keyboards too.
Commands in this lesson
color
Definition: Sets the text color.
Syntax:
color: value;
Example:
color: crimson;Example code
<p><label>Date <input type="date"></label></p>
<p><label>Age <input type="number" min="1" max="99"></label></p>
<p><label>Volume <input type="range"></label></p>
<p><label>Color <input type="color"></label></p>
<p><select><option>Pick one</option><option>HTML</option><option>CSS</option></select></p>