Learn HTML Forms - Step 5 Issue

The answers I found online for this issue didn’t work so reaching out on here as I am stuck.

Course: Responsive Web Design Certification/Learn HTML Forms by Building a Registration Form/Step 5

Step 5
Nest a link element within the head element. Give it a rel attribute with a value of stylesheet and an href attribute with a value of styles.css.

“Sorry, your code does not pass. Keep trying.”
“Your link element should be inside your head element.”

I tried the link element in various forms but keeps returning “Your link element should be inside your head element.”

I even went to look at the next question, got the code from there and put it in to step 5 and still didn’t work.

Any help be appreciated thanks

Please post your current code and a link to the step. Thanks

Thanks for your swift response, here you go.

Link to step 5

Code taken from step 6 to check

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

Have already tried these variations at closing tag…

<link rel="stylesheet" href="styles.css" />
<link rel="stylesheet" href="styles.css"/>
<link rel="stylesheet" href="styles.css" >
<link rel="stylesheet" href="styles.css">

The code looks ok to me. You should make sure all of your browser extensions are disabled.

I seem to also recall encountering this same issue and thinking it was a bug.

I don’t recall what eventually worked but you may try
... href="./styles.css"/>
Note the ./

Thank you for your response. I tried this plus many other ways, still responds “Your link element should be inside your head element.” - which it is.

Thanks, browser extensions are already disabled and I have cleared the cache.

Any other ideas?

Hi there !

Post your full html code here.

Hi,

Here it is

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

Thank you

link elements are void elements, so they don’t need a closing tag

There is a backslash where there shouldn’t be, can you spot it?

Happy Coding

Hi there! Clean browser cache, close dark mode , extensions or change the browser and try again.

Hi!

Back slash isn’t the problem with the test case.

Yeah, I realized that
It passes for me with and without it

2 Likes

Thank you,

The same code that failed in Safari just worked in Firefox.

<link rel="stylesheet" href="styles.css" />

I had previously tried the other options you mentioned.

Appreciated : )

1 Like

Good for you!

1 Like