Courses
/
HTML5 Mastery: Complete Beginner to Advanced Course
/
HTML Buttons & Choices
HTML Buttons & Choices
Common Mistakes
- Giving related radio buttons different names.
- Using radio buttons when multiple selections are needed.
- Using checkboxes when only one option should be selectable.
- Forgetting type="button" for a button that should not submit a form.
- Assuming that client-side required validation replaces server-side validation.
Practice Exercises
- Create radio buttons for selecting a gender-neutral title such as Mr, Ms or Mx.
- Create checkboxes for selecting multiple programming skills.
- Create a required terms-and-conditions checkbox.
- Create submit, reset and ordinary buttons in one form.
- Explain why related radio buttons must share the same name.
Revision Quiz
- Which control is used to choose one option from a group?
- Which control supports several independent selections?
- Which attribute groups radio buttons together?
- Which button type submits a form?
- Which button type has no default form-submission behavior?
- What does a reset button do?
Answer Key and Explanations
- Radio button — It is used for a single choice within a group.
- Checkbox — Multiple independent checkboxes can be checked.
- name — Matching names create a radio group.
- submit — It initiates form submission.
- button — It requires application behavior for an action.
- Restores initial values — It does not necessarily empty every field.
Rate this course
★
★
★
★
★
5.0 · 1 rating
Stars show on this course. Your written note stays private.