About <style> tags for smaller-image

it’s not working it is still displaying errors for my code don’t seem to know why.

  **<style>

.smaller-image {
width: 100px;
}


**


<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">
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
  <input id="indoor" type="radio" name="indoor-outdoor">
  <label for="indoor">Indoor</label>
  
  <label for="outdoor" type="radio" name="indoor-outdoor">Outdoor</label>
</form>
</main>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36 OPR/84.0.4316.52

Challenge: Create a Set of Radio Buttons

Link to the challenge:

I ran your code and here are the errors, I will explain them for you:
1. Each of your two radio button elements should be nested in its own label element.
To avoid confusion, you should start with labels first. For better understanding about labels, here’s a short statement about it:
The <label> tag in HTML is used to provide a usability improvement for mouse users i.e, if a user clicks on the text within the <label> element, it toggles the control.
Thus, labels are very important to start with, before putting your input element inside it. Going back to the error, this is how the format should be:
<label><input></label>
<label><input></label>
For the last error:
2. Your radio buttons should be given the name attribute of indoor-outdoor.

You only have one input element in your code. You should fix this part here.

If there’s still something you need help with, don’t hesitate!

1 Like