Step 56 in cat photo

I got the code done, but what I don’t get is that we were never introduced value=“personality” or name=“attribute” or for=“loving”>Loving. I mean where do they come from or is it something new?? all these terms are new and was never in the question. For someone like me that is totally new to this coding, is there a way to introduce it more details prior to this step 56? Took me so long to look up the answer, now that I have the answer but don’t really understand it. I’m not sure if I’m making any sense or got my point across.

Associate the text “Loving” with the checkbox by only nesting the text “Loving” in a “label” element and place it to the right side of the checkbox “input” element.

I’m not sure I understand your question. The for attribute is introduced in the instructions on this step:

There’s another way to associate an input element’s text with the element itself. You can nest the text within a label element and add a for attribute with the same value as the input element’s id attribute.

The value and name attributes are not part of Step 56.

name attributes were introduced on Step 39

In order for a form’s data to be accessed by the location specified in the action attribute, you must give the text field a name attribute and assign it a value to represent the data being submitted. For example, you could use the following syntax for an email address text field: <input type="text" name="email">.

value attributes were introduced on Step 48

Notice that both radio buttons can be selected at the same time. To make it so selecting one radio button automatically deselects the other, both buttons must have a name attribute with the same value.

The objective was to associate the label to its associated input element so a screen reader or browser can understand that these two things go together.
This is accomplished by assigning a unique id to the input element then matching the id’s value in a for attribute which is included in the label. Thus linking them to each other.

Hope that helps.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.