|
19 | 19 | <div class="widget">
|
20 | 20 | <h1>Checkbox and radio button widgets</h1>
|
21 | 21 | <h2>Checkbox</h2>
|
22 |
| - |
23 | 22 | <fieldset>
|
24 |
| - <legend>Rating</legend> |
25 |
| - <label for="checkbox-1">2 Star</label> |
26 |
| - <input type="checkbox" name="checkbox-1" id="checkbox-1"> |
27 |
| - <label for="checkbox-2">3 Star</label> |
28 |
| - <input type="checkbox" name="checkbox-2" id="checkbox-2"> |
29 |
| - <label for="checkbox-3">4 Star</label> |
30 |
| - <input type="checkbox" name="checkbox-3" id="checkbox-3"> |
31 |
| - <label for="checkbox-4">5 Star</label> |
32 |
| - <input type="checkbox" name="checkbox-4" id="checkbox-4"> |
| 23 | + <legend>Filter by rating</legend> |
| 24 | + <label for="rating-1">2 Star</label> |
| 25 | + <input type="checkbox" name="rating" id="rating-1" value="1"> |
| 26 | + <label for="rating-2">3 Star</label> |
| 27 | + <input type="checkbox" name="rating" id="rating-2" value="2"> |
| 28 | + <label for="rating-3">4 Star</label> |
| 29 | + <input type="checkbox" name="rating" id="rating-3" value="3"> |
| 30 | + <label for="rating-4">5 Star</label> |
| 31 | + <input type="checkbox" name="rating" id="rating-4" value="4"> |
33 | 32 | </fieldset>
|
34 | 33 | <h2>Radio Group</h2>
|
35 | 34 | <fieldset>
|
36 |
| - <legend>Location: </legend> |
37 |
| - <label for="radio-1">New York</label> |
38 |
| - <input type="radio" name="radio-1" id="radio-1"> |
| 35 | + <legend>Filter by location: </legend> |
| 36 | + <label for="location-new-york">New York</label> |
| 37 | + <input type="radio" name="location" id="location-new-york"> |
39 | 38 | <label>Paris
|
40 |
| - <input type="radio" name="radio-1" id="radio-2"> |
| 39 | + <input type="radio" name="location" id="location-paris"> |
41 | 40 | </label>
|
42 |
| - <input type="radio" name="radio-1" id="radio-3"> |
43 |
| - <label for="radio-3">London</label> |
| 41 | + <input type="radio" name="location" id="location-london"> |
| 42 | + <label for="location-london">London</label> |
44 | 43 | </fieldset>
|
45 | 44 | </div>
|
46 | 45 |
|
|
0 commit comments