Learn HTML by Building a Cat Photo App - Step 56

Tell us what’s happening:
I am trying to add a for attribute inside of a label element but it looks like I’m not doing it right… any ideas on what I’m doing wrong?

Your code so far


      
            <input id="loving" type="checkbox"> <label> for="loving" </label>
         
 

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15

Challenge: Learn HTML by Building a Cat Photo App - Step 56

Link to the challenge:

Hi @Shae_00 ! Welcome to the forum!

When you add an “attribute” with a “value”, it will look something like this:

<element attribute="value">Text within the element</element>

For example, if you look at your input element, it has the attribute id with the value loving. It also has the attribute type with the value checkbox.

<input id="loving" type="checkbox">

Now can you guess how you should add the attribute for and its value loving to your label element?

3 Likes

I love your explanation. Neat and understable. Thanks!

2 Likes

Ah thank you so much for explaining it for me I managed to complete the step!

Congratulations! Keep it up :+1:

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