Learn CSS Variables by Building a City Skyline - Step 4

Tell us what’s happening:
I can’t move past this step. I have the link element all typed out, but it keeps telling me I need a self-closing link element when I try submit it and move on. I’m a bit confused, what am I missing?

Your code so far

<!DOCTYPE html>
<html lang="en">

<!-- User Editable Region -->

  <head>
    <meta charset="UTF-8">
    <title>City Skyline</title>
    <link rel="stylesheet" href="styles.css">
  </head>

<!-- User Editable Region -->

  <body>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0

Challenge: Learn CSS Variables by Building a City Skyline - Step 4

Link to the challenge:

Your code passes the test for me. Try using a different browser and doing the challenge again. See if that works

I was using FireFox, so I went onto Chrome and it still wasn’t working there. It tells me:
" Your link element should have an href attribute with the value styles.css."

which is clearly in the code.

That is weird. Usually switching your browser fixes the issue in this situation. Im on my phone, and I tried copying your code again. It passes the challenge for me.

Interestingly, when I try the code on mobile it tells me it’s the meta tag that’s not right.

Thats really weird. I don’t see anything wrong with your code, or why it would say its wrong

I’ve added an image above of the error I get on my desktop.
Below here is the mobile error (I couldn’t add more than one image in the OP)

i am also facing the same issue, it says again and again about adding self closing link element even after writing it

1 Like

Alright, so I managed to pass the challenge after switching to Edge. Other posts mentioned disabling extensions that may cause issues with freecodecamp, but that didn’t seem to help me on Firefox. And so far it’s only seemed to be this particular step in the course where it’s happened.

1 Like

ok let me try on edge then we’ll see

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