STUCK on Step 50

Tell us what’s happening:
Describe your issue in detail here.
Code does not pass even though the legend text has been entered in correctly, not sure where I’ve got it wrong.

  **Your code so far**
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more <a target="_blank" href="">cat photos</a>.</p>
      <a href=""><img src="" alt="A cute orange cat lying on its back."></a>
      <h2>Cat Lists</h2>
      <h3>Things cats love:</h3>
        <li>cat nip</li>
        <li>laser pointers</li>
        <img src="" alt="A slice of lasagna on a plate.">
        <figcaption>Cats <em>love</em> lasagna.</figcaption>  
      <h3>Top 3 things cats hate:</h3>
        <li>flea treatment</li>
        <li>other cats</li>
        <img src="" alt="Five cats looking around a field.">
        <figcaption>Cats <strong>hate</strong> other cats.</figcaption>  
      <h2>Cat Form</h2>
      <form action="">
          <legend text "Is your cat an indoor or outdoor cat?"></legend>
          <label><input id="indoor" type="radio" name="indoor-outdoor" value="indoor"> Indoor</label>
          <label><input id="outdoor" type="radio" name="indoor-outdoor" value="outdoor"> Outdoor</label>
        <input type="text" name="catphotourl" placeholder="cat photo URL" required>
        <button type="submit">Submit</button>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15

Challenge: Step 50

Link to the challenge:

The text for an element goes in between the opening and closing tags. For example, the text for an h2 heading is:

<h2>This is the text for the heading</h2>

Do the same thing for the legend.

Thanks a lot. I’d been stuck on this for hours. Just for clarity, which elements require quotation marks and which do not?

I’m not quite sure I understand this question. You never need to use quotation marks to put content in an element unless there are actually quotation marks in the content, but then you would use HTML entity codes to do that. Is this what you were referring to, or something else?

My question is referring to the use of quotation marks in different elements, for example in a previous step I was instructed to add indoor-outdoor buttons and quotation marks were needed so that the choices could be displayed on the website; this was under the input element with id, type and name attributes. However, with the legend element no quotation marks were needed and id been stuck on the step for ours only because I had added quotations marks when I shouldn’t have. So I’m not sure if its specific elements that require these quotation marks or its only for attributes that require this.

Thanks for the reply btw

The difference is that attributes aren’t actual content in the element, they are additional information about the element. Attribute values are always strings so you use quotation marks to define the string. Technically, if the string doesn’t have any spaces in it then you don’t need the quotation marks, but I think it’s considered best practice to always include them.

Content in the element (such as text in a p element) is the actual content you want to display on the page for the element. Anything you put in between the opening and closing tags for the element is what you intend to display on the page. So if you put quotation marks in the content for the element then those quotation marks will show up on the page.

1 Like

Wow bro, I really appreciate you taking your time to explain. Great explanation🫶🏽

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.