For some reason I get this error "You should have one self-closing link element" I can't figure out what's wrong with my code! how do I fix it? *My code below*

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Ferris Wheel</title>
    <link rel="stylesheet" href="./styles.css"/>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  </head>
  <body>
    
  </body>
</html>

the element you have doesn’t need the /> to self close, you are closing an element which doesn’t need to be closed so if you remove the forward slash “/” then it should fix the issue! hope this helps! I’m fairly new to this myself so someone may have a more in depth explanation than me!

Please post a link to the challenge so I can test your code there.

I tried that several times it isn’t helping at all as I keep getting the same error, I’ve ran out of options.

Here’s the original Question below from the curriculum.

Begin with the standard boilerplate. Add your DOCTYPE declaration, your html element with the language set to English, your head and body elements.

Add your meta element for the correct charset, your title element, and a link element for the ./styles.css file.

Set the title to Ferris Wheel.

Here is the link

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

2 Likes

It worked :smiley: I switched from Google Chrome to Microsoft Edge

2 Likes

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