The ______ attribute in a label element should contain the ID of a related form control.
- bind
- connect
- for
- rel
The for attribute in a label element specifies which form element a label is bound to. It should contain the ID of the related form control. This ensures that when the label is clicked, the associated input field gains focus, which enhances accessibility and usability.
Loading...
Related Quiz
- What is the primary purpose of the alt attribute in an img tag?
- To ensure that table headers are associated with their corresponding cells for screen readers, use the ______ attribute.
- Which tag would be used to display a mathematical formula with exponents?
- How can the "button" element be used for client-side form validation before submission?
-
The ______ attribute in the
tag is used to associate the image with an image map.