Hello. I am on the Step 4 of Building a Registration Form. IT request :
Add a title
element to the head
, and give your project a title of Registration Form
. Also, nest a self-closing link
element in the head
element. Give it a rel
attribute value of stylesheet
, a type
attribute value of text/css
, and an href
attribute value of styles.css
.
My code is:
<!DOCTYPE html>
<html>
<head>
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
</body>
</html>
The system shows me:
Sorry, your code does not pass. Hang in there.
Hint
Your link
element should be a self-closing element.
**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:
Please enclose your code with 3 backticks(`)
Code enclosed with backticks:
<div>
<p> Some text </p>
</div>
Code not enclosed with backticks:
You can also use the “preformatted text” tool in the editor ( </>
) to add backticks around text.
zae
May 18, 2022, 8:30pm
3
i have the same problem.
my code is:
<head>
<title>Registration Form </title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
</body>
b4c1c
May 18, 2022, 8:56pm
4
open web browser and ask:
what is self-closing element
zae
May 18, 2022, 9:03pm
5
i tried that also and i still get the same error.
b4c1c
May 18, 2022, 9:06pm
6
maybe is a typo… read it again
zae
May 18, 2022, 9:11pm
7
i copied and pasted the words on the instructions in case of a typo and i don’t know what to do.
<head>
<title> Registration Form </title>
<link rel="stylesheet" type="text/css" href="styles.css"/>
</head>
<body>
</body>
Test
Sorry, your code does not pass. You’re getting there.
1 Like
b4c1c
May 18, 2022, 9:13pm
8
I found this. looks like it’s bug, fixed but not released, as I understand
The issue has been fixed but may not have made it into production yet.
1 Like
zae
May 18, 2022, 9:15pm
9
Oh good. I was going crazy for a second there.
1 Like
zae
May 18, 2022, 9:22pm
10
i had to delete spaces in the code. The ones in front of the link.
Lame, guess it’s time to go touch some grass. I was really getting into a groove too.
Deleting the spaces didn’t work for me.
b4c1c
May 19, 2022, 4:56pm
13
do you mean in <title>
? I see spaces there _Registration Form_
b4c1c
May 19, 2022, 4:59pm
14
What worked for you? Did you pass the step?
They were referring to the white space before the link tag. my code is below.
<head>
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
</body>
I’ve switched out all of the quote marks between single, double, and nonexistant. I’ve moved the link tag to above the title. I’ve also removed all white space before the link tag in all instances.
1 Like
Also, no, I’ve not been able to progress
I am also having the exact same issu e
b4c1c
May 19, 2022, 5:23pm
18
I found this. looks like it’s bug, fixed but not released, as I understand
Maybe is still this… I wonder how I pass that part
opened 08:56PM - 22 Feb 22 UTC
closed 07:08AM - 29 Jun 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)
I have been having issues with the same step. I came out of it and then just clicked step 5 on the curriculum page and I have been able to carry on. Hope that helps.
b4c1c
May 19, 2022, 5:27pm
20
I just redo step, works fine for me.
So I ask again, did you look up for self-closing element?