Getting start learning HTML

Tell us what’s happening:
couldn’t complete the task. I don’t know where is the error

Your code so far

<textarea placeholder="Allergies, and extra information"></textarea><br>
  
<button type="submit">Order Sandwich</button>
</form>

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

<a href="#"><img src="https://bit.ly/fcc-relaxing-cat" 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="/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><input type="checkbox" name="personality" value="loving"> loving</label>
  <label><input type="checkbox" name="personality" value="lazy"> lazy</label>
  <label><input type="checkbox" name="personality" value="energetic"> energetic</label><br>
<textarea placeholder="loving, lazy, energetic"></textarea><br>

<button type="submit">personality</button>
</form>   

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0.

Challenge: Use the value attribute with Radio Buttons and Checkboxes

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/basic-html-and-html5/use-the-value-attribute-with-radio-buttons-and-checkboxes.

One of your checkboxes should have the value attribute of loving .

One of your checkboxes should have the value attribute of lazy .

One of your checkboxes should have the value attribute of energetic .

You should not have changed the text inside the tags (their contents).

<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>
  
  <a href="#"><img src="https://bit.ly/fcc-relaxing-cat" 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="/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><input type="checkbox" name="personality"> Loving</label>
    <label><input type="checkbox" name="personality"> Lazy</label>
    <label><input type="checkbox" name="personality"> Energetic</label><br>
    <input type="text" placeholder="cat photo URL" required>
    <button type="submit">Submit</button>
  </form>
</main>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

Is your code passing now? If not, what tests are failing?

I got those error : One of your checkboxes should have the value attribute of loving .

One of your checkboxes should have the value attribute of lazy .

One of your checkboxes should have the value attribute of energetic .

None of your checkbox inputs have a value.

<label><input type="checkbox" name="personality"> Loving</label>
<label><input type="checkbox" name="personality"> Lazy</label>
<label><input type="checkbox" name="personality"> Energetic</label>

Where should I make the changes !

You have inputs with type “checkbox”. You need to give each one a value attribute.

still same , I don’t know what should I replace or make the change

Show me where the value property is.

name=“personality” !

That’s the name property.

I’m getting lost


Loving

Look at the example code. It tells you how to add a value property. Currently your inputs only have two attributes: type and name.

got it now, I got confused because of the order of the lines :sweat_smile:

Good job figuring it out. Happy coding!

only loving get through the rest 2 are wrong why ??!

Loving

lazy

<input id=“energetic” value=“energetic”

type=“checkbox” name=“personality”>energetic


Why did you change “Energetic” to “energetic” inside the tag? You should only change the value.

1 Like

Done :ok_hand:t6: :heart: