CHOOSE ANY STEP
FREECODECAMP / HTML / STEP 5 OF 7
freeCodeCamp: Build an Accessible Audio Controller, Step 5
Give the slider a range and starting value
Written guidance is free. Step videos are a member benefit.
Inside the div element, after the span whose id is volume-description, add one input element. It has no closing tag.
ORIGINAL WALKTHROUGH · 1:18
Watch with Rob.
Watch the explanation, then apply the change and run the official checks on freeCodeCamp.
You are signed in, but video access needs attention. Check your account access. Your saved work is kept.
Video walkthroughs are included with an active Code Zone membership. The written lesson and practice are free.
Your goals for this step
- Complete step 5: Give the slider a range and starting value.
- A range input provides a native slider.
- Compare the browser result with the requirement before running the official checks.
THE TASK
What step 5 asks you to do
- Inside the div element, after the span whose id is volume-description, add one input element. It has no closing tag.
- Set the input’s type to range.
- Set min to 0, max to 100 and value to 50, with each value inside quotation marks.
Based on the official freeCodeCamp step 5 instructions (opens in a new tab).
Why this works
A range input provides a native slider. Explicit minimum, maximum and initial value make the requirement clear even when browser defaults happen to look similar. A void input element has no closing tag.
What you should see in the preview
A native slider appears with its handle around the middle. Dragging or pressing arrow keys while it has focus changes its current value. The initial value is 50; this slider does not control any real sound.
Illustrative browser result. External embeds, navigation and form submission are disabled here. Open freeCodeCamp to test the real behavior. Drag the lower-right corner to make this preview taller.
Terms to know
- input: Input element
- Creates a form control. It is a void element, with no closing tag. Its type chooses the native control.
- range: Range input
- A native slider for choosing a value between a minimum and maximum. It supports pointer and keyboard input.
- min: Minimum value
- Sets the lowest permitted value of the range input.
- max: Maximum value
- Sets the highest permitted value of the range input.
- value: Initial value
- Sets the input’s starting value. A user can still move the range control afterward.
If your check does not pass
- Check that the new element is inside the exact parent named in the task.
- Compare required text, attribute names and quoted values letter by letter.
- Preserve the earlier elements, then run the checks on freeCodeCamp.
Use the preview to inspect the structure, then run the checks on freeCodeCamp. Watching here does not submit code or mark an official step complete.
Know where to find it
You do not have to memorize every element or CSS property. Keep useful references nearby:
- W3Schools: form input types (opens in a new tab)
Compare the syntax and a focused example.
- W3Schools: form attributes (opens in a new tab)
Compare the syntax and a focused example.
- MDN: HTML element reference (opens in a new tab)
Look up the definition, syntax and supported behavior.
What you have accomplished
The change for “Give the slider a range and starting value” is ready to try. Return to freeCodeCamp, compare your result with the requirements, and run its checks. Your official progress stays there.
Independent guidance from The Code Zone, not affiliated with or endorsed by freeCodeCamp. Complete official work and certification requirements on freeCodeCamp. Curriculum checked November 16, 2026. Curriculum source (opens in a new tab).