Why the code is wrong if i use correctly the CSS degrade option?

I explain it, my issue is on CSS course. I´m put correctly the “monospace font” how secondary option if the principal font (Lobster in this case) isn´t available, but the test say me " Your h2 element should degrade to the font monospace when Lobster is not available." in an correctly declaration used.
My CSS declaration is :
h2 {
font-family: Lobster, monospace;

Include a link to the challenge, and the full code with pre formatted text

1 Like

Link: https://www.freecodecamp.org/learn/responsive-web-design/basic-css/specify-how-fonts-should-degrade


<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">


  .red-text {

    color: red;

    font-family: Lobster, monospace;


  h2 {

    font-family: Lobster, monospace; <!--Se usa Lobster como predeterminado, si no esta disponible, aplicamos monospace.-->


  p {

    font-size: 16px;

    font-family: monospace;



<h2 class="red-text">CatPhotoApp</h2>


  <p class="red-text">Click here to view more <a href="#">cat photos</a>.</p>



    <p>Things cats love:</p>


      <li>cat nip</li>

      <li>laser pointers</li>



    <p>Top 3 things cats hate:</p>


      <li>flea treatment</li>


      <li>other cats</li>



  <form action="https://freecatphotoapp.com/submit-cat-photo">

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

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

    <label><input type="checkbox" name="personality" checked> 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>



Start with a RESET:

The tutorial asks us to add monospace to the h2 element:

 h2 {
    font-family: Lobster, monospace;

Then it asks us to COMMENT-OUT <!-- -->
the GOOGLE fonts Import <link href> tag:

<!--<link href="https://fonts.googleapis.com/css?family=GENERIC-FONT" rel="stylesheet" type="text/css">-->`
1 Like

Yea, truly i coded how you recommended but anyway de test show me an error in the 2nd requisite. I don´t stend why, but is impossible to me run the test 100% correctly.
Thank you for your reply me and gived me your time. If i can do this challenge i say to you.
PD: I´m sorry for my english grammar, i am from an non-english country, I’m sure you’ve noticed it

Send the code again, in ONE page
and format it like this: (with the preformatted text)


1 Like

Well, i was able to solve the issue, the problem was in the comment line, is´n an joke, I put the comment line outside the h2 field in CSS and the problem was resolved. Thank you for helped me to find the error. A greeting for you!

1 Like

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