Problema con atributo value / Problem with value

Tengo un problema con el ejercicio del atributo value, no sé que estoy haciendo mal. Agradezco su ayuda desde ya :slight_smile:
I have a problem with this exercise, i don’t know what i’m doing wrong. I’ll appreciate your help :slight_smile:

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="https://www.freecatphotoapp.com/submit-cat-photo">

    <label="indoor">
      <input type="radio" name="indoor-outdoor" value="indoor">Indoor</label>

    <label="outdoor">
      <input type="radio" name="indoor-outdoor" value="outdoor">Outdoor</label><br>

    <label="loving">
<input type="checkbox" name="personality"
value="loving">Loving</label><br>

    <label="lazy">
      <input type="checkbox" name="personality" value="lazy">Lazy</label><br>

    <label="energetic">
      <input type="checkbox" name="personality" value="energetic">Energetic</label><br>

    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

Hi!

Check the labels in your HTML once again!

<label>

is a tag and can not have a value!

Attributes in labels have values! for example:

<label for="some_value">Some text</label>
1 Like

Hey, thanks for answering. I corrected it and it’s still wrong. Don’t know what to do :frowning:

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="https://www.freecatphotoapp.com/submit-cat-photo">

    <label for="indoor"><input id="indoor" value="indoor" type="radio" name="indoor-outdoor"> indoor</label>
    <label for="outdoor">
      <input id="outdoor" value="outdoor" type="radio" name="indoor-outdoor"> outdoor</label><br>
    <label for="loving">
      <input id="loving" value="loving" type="checkbox" name="personality"> loving</label>
    <label for="lazy"><input id="lazy" value="lazy" type="checkbox" name="personality"> lazy</label>
    <label for="energetic">}
      <input id="energetic" value="energetic" type="checkbox" name="personality"> energetic</label><br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

Good morning!

I think the first letter of the text before </label> should be uppercase.
For example Javascript instead of javascrript
I hope it helps!

Hi! I’ve done it and still it doesn’t run. Do you think there’s any mistake in this code? I don’t know where is the mistake and it frustrates me :frowning:

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>

  <a href="#"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."></a>

  <p>Things cats love:</p>
  <ul>
    <li>cat nip</li>
    <li>laser pointers</li>
    <li>lasagna</li>
  </ul>
  <p>Top 3 things cats hate:</p>
  <ol>
    <li>flea treatment</li>
    <li>thunder</li>
    <li>other cats</li>
  </ol>
  <form action="https://www.freecatphotoapp.com/submit-cat-photo">
    <label for="indoor"><input id="indoor" type="radio" name="indoor-outdoor">Indoor</label>
    <label for="outdoor"><input id="outdoor" type="radio" name="indoor-outdoor">Outdoor</label><br>
    <label for="loving"><input id="loving" type="checkbox" name="personality">Loving</label>
    <label for="lazy"><input id="lazy" type="checkbox" name="personality">Lazy</label>
    <label for="energetic"><input id="energetic" type="checkbox" name="personality">Energetic</label><br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

I reseted the code and put value after input id and it worked! So for me i think there’s has to be an order i guess?

1 Like

Hi,

Only the value="...." is missing. Otherwise everything is OK!

Blockquote

Yeah, i’ve done it so many times my head is burning.
I guess in the code i copypasted before, the code was ok, but now thinking about it, it definitely has to do with the order of the value=“xxx”.
Something tells me it has to be written before input id, the main problem is that i thought all type, name, etc could be written in a different order that it wouldn’t matter and the code would be still fine. And in the further exercise of putting the checked thing, the value was at the end of the code so it still confuses me.
Also maybe when i reseted the code and only added value it became successful so maybe it was a mistake with the writing, i don’t know what to think :’(
Sorry if there’s a mistake in my writing as english is not my mother language :confused: