Lesson 6 of 55
HTMLAdvanced Form Controls – Range, Color, File
9 min
Course progress11%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 6 of 55
HTML9 min
Keep these ideas in mind as you work through the lesson.
<label for='volume'>Volume:</label>
<input type='range' id='volume' name='volume' min='0' max='100' step='5' value='50' />
<label for='favcolor'>Pick a color:</label>
<input type='color' id='favcolor' name='favcolor' value='#ff0000' />
<label for='resume'>Upload resume:</label>
<input type='file' id='resume' name='resume' accept='.pdf,.doc,.docx' multiple />
<input type='range'>::-webkit-slider-thumb, ::-moz-range-thumb, and the generic ::-ms-thumb pseudo‑elements for a custom look.aria-valuemin, aria-valuemax, aria-valuenow) if you hide the native UI.<input type='color'><input type='file'>accept restricts selectable file types; you can also use MIME types (e.g., accept='image/*').multiple allows several files to be selected.enctype='multipart/form-data' on the <form>.range) labelled and ARIA attributes present? ✅accept attribute limits uploads appropriately? ✅enctype='multipart/form-data' set when using file inputs? ✅Tip: Use CSS variables to theme the colour picker display if you implement a custom UI.