Question about "for" attribute

Hello all,

I have a question about the “for” attribute. To give readers some context, I am referring to “Step 56” on the HTML Cap Photo App: Step 56. So my question is this: is the “for” attribute only to be used in HTML tags when making checkboxes?

Thanks!

The “for” attribute is to be used in order to add a label to an ‘input’ element. Html “for” attribute corresponds with the id’ attribute in the ‘input’ element":

<label for="smth"><input id="smth">Label</label>

Something as simple as the above code snippet will produce:
image

Simply said, we want to know which ‘label’ and ‘input’ elements make a pair.