Where I am wrong? Can someone help me with this

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

<style>

 .p{

    font-family: monospace; 

 }

 

 .h2{

    font-family: lobster; href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"

  }

  .h2{

    font-family: lobster;

  }

</style>

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

<main>

  <p class="red-text">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>

  <div>

    <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>

  </div>

  <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>

  </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.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

1 Like

Which challenge is this?

Not sure if this is the problem, but you don’t put the tag attributes in the css. Probably was a copy/paste error?

 font-family: lobster; href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css"

Hello, What’s the Error in the code?
but I think I spotted one, the tag attribute should not be included, you can use another font famiy as a fallback incase lobster is not available;

/* font-family: lobster;  href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css" */

font-family: lobster,  Arial, Helvetica, sans-serif;

i think the problam is you dont need to put the href tag in your ‘style’. just put it like this:

h2{
font-family: lobster;
}

also when you make a class for a specific tag you dont add the period (.)

@saba1
For the HTML tags, there is no use of “dot”.

For Example

//No dot here
p {
      font family: monospace;
}

In your code, there are dots For HTML tags.

For the h2 tag,
no herf tag should be used in CSS.
if you need to import google font in CSS you should use @import or link href=Url but Google provides the code for you when you choose the font it will be in

You can take @import or link href=.
Make sure it always on the top of CSS Codes

Hope this Help you,

1 Like