Step 4 of this challenge keeps rejecting my code and I’m not sure why. Wondering if there is something wrong with the challenge itself or if I’m just an idiot.
**Your code so far**
<!DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
</body>
</html>
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.0.0 Safari/537.36
Challenge: Step 4
Link to the challenge:
opened 08:56PM - 22 Feb 22 UTC
type: bug
help wanted
scope: curriculum
<!--
NOTE: If you're reporting a security issue, don't create a GitHub issue. I… nstead, email security@freecodecamp.org. We will look into it immediately.
-->
## Affected page
https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-forms-by-building-a-registration-form/step-4
There are most likely other steps affected as well.
## Discussion
The test for this step fails if the `<link>` tag does not include the forward slash before the ending `>`. According to [whatwg.org 13.1.2.1 Start tags](https://html.spec.whatwg.org/multipage/syntax.html#start-tags), point 6:
"Then, if the element is one of the [void elements](https://html.spec.whatwg.org/multipage/syntax.html#void-elements), or if the element is a [foreign element](https://html.spec.whatwg.org/multipage/syntax.html#foreign-elements), then there **may** be a single U+002F SOLIDUS character (/). **This character has no effect on [void elements](https://html.spec.whatwg.org/multipage/syntax.html#void-elements)**, but on foreign elements it marks the start tag as self-closing."
This seems to imply that the forward slash is optional on the `<link>` tag and thus the test should pass if the user does not include it. There are 14 void elements that this applies to:
[area](https://html.spec.whatwg.org/multipage/image-maps.html#the-area-element), [base](https://html.spec.whatwg.org/multipage/semantics.html#the-base-element), [br](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element), [col](https://html.spec.whatwg.org/multipage/tables.html#the-col-element), [embed](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element), [hr](https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element), [img](https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element), [input](https://html.spec.whatwg.org/multipage/input.html#the-input-element), [link](https://html.spec.whatwg.org/multipage/semantics.html#the-link-element), [meta](https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element), [param](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-param-element), [source](https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element), [track](https://html.spec.whatwg.org/multipage/media.html#the-track-element), [wbr](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element)
The issue has been fixed but may not have made it into production yet.
system
Closed
November 17, 2022, 8:24am
3
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.