HTML/CSS Assessment Question 10/12

Hi! Can someone please tell me what I’m doing wrong I can’t figure it out :^(

The ones I got wrong were

  • 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’

Hi there,
In looking at the HTML in your submitted assessment, I think you may actually just have had one mistake that was causing both errors.

This was in the code you submitted - you had incorrectly associated the label with the select element:

        <label for="name">Type</label>
        <select id="type" name="pet_type">
          <option value="cat">Cat</option>
          <option value="dog">Dog</option>
          <option value="hamster">Hamster</option>
          <option value="other">Other</option>
          <option value="zebra">Zebra</option>

However, the code you pasted above doesn’t match what was submitted, and it looks like you already corrected the mistake in the code pasted above.

I suspect that the code in your file is correct, but you may not have saved your final revisions before submitting the project. Another possibility is that you corrected the issue, but accidentally resubmitted the old zip file that still had the mistake.

I recommend making sure everything is saved with the correct code, and moving or deleting your old zip files before zipping your submission, to make sure you submit the correct version.

Let us know how it goes!

Thanks Jesse! You’re right I did accidentally submit the wrong one. I fixed the pet type but I think my pet name stayed the same I’m still confused on that one I don’t see what’s wrong with it, if you have any feedback I’d appreciate it, thank you!

1 Like

I think that by fixing the pet type, you will resolve both of the failed tests. I think you failed the name test because you were associating two different labels with the same input, but now you have fixed that. I think you are ready to submit if the type is fixed.

OOHHH that makes sense, thank you so much!!

1 Like