Errors for HTML/CSS

Learning Challenge

HTML/CSS Challenge


Here are the three errors I received:

The questions you missed were:

  • has one card

  • has exactly one input with a name of ‘pet_name’ and an associated label with the content ‘Name’

  • has exactly one ‘select’ element with a name of ‘pet_type’ and an associated label with the content ‘Type’.

What I’ve tried

For the first error:
I am a bit lost there. I have one card defined below. I do have a card_container and I have a reference in the to a card in CSS. Could that be getting picked up?

For the last two errors:
I think what I am seeing as the potential error has to do maybe with the “for=” part? I wonder if that is misaligned to the rest of the code since I have it set equal to the corresponding “name=”? Perhaps it is reading it that way?


Check line 10 in your screenshot … notice that you have a class="card" attribute on your link element. link elements don’t support a class attribute so you can remove that.


This might help put you on the right track. Let me describe the reason behind having the for attribute and what its purpose is. When you have hooked the for attribute on a label up correctly … it will make it so that when you click on the label with your mouse … it will put your cursor in the associated text field. ie, if you clicked on the text “Name” in the browser … your mouse would end up in the text field for the pet name.

Therefore, when you have hooked the id, name, and for attributes up correctly … you should see the behavior described above work on both the select element as well as the input element.

Hopefully that helps, @aawferris! You’re almost there! :fire: :rotating_light: :fire_engine: :fire_extinguisher: :fire:

Thank you for explaining that, Bryan! I am hungry to learn to the point of mastery, so I appreciate any and all teaching!

Thanks again,


1 Like