Learn HTML Forms (New) Step 4 - Submit Issue

Tell us what’s happening:
Describe your issue in detail here.

I’m being given the hint, Hint: Your link element should be a self-closing element. The code is fine however. Is this a glitch?

  **Your code so far**

<!DOCTYPE html>
<html>
<head>
  <title>Registration Form</title>
  <link href="styles.css" rel="stylesheet" type="text/css">
</head>
<body>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36

Challenge: Step 4

Link to the challenge:

Even though the link element is a self-closing element it is expecting you to close it like so - <link />. The closing of self-closing elements like this is more of a stylistic choice if I understand correctly. Some browsers used to not register content that was not closed (even in the case of self-closing elements) so to counteract this developers started closing them in this manner. I believe all browsers now recognize them as closed elements regardless of the forward slash.

1 Like

Thanks for the response. I was duped as up to that time no self closing element had required that /. Happy coding!

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