KnowledgeBoat Logo

Computer Applications

A label's for attribute should match the input's …………… .

  1. type
  2. id
  3. name
  4. size

HTML Advanced Features

1 Like

Answer

id

Reason — The for attribute of a <label> tag should match the id attribute of the corresponding input element. The for attribute is used to associate a label with a form control, providing a textual description or caption for the input field.

Answered By

2 Likes


Related Questions