0xMist
April 29, 2022, 9:06pm
1
I am sorry if anyone posted this earlier, but I coudn’t find a proper disscusion about this specific issue.
Inside the First part of the curriculum, at the point the student needs to make the HTML form (Learn HTML Forms by Building a Registration Form), prior to the first certification exam. At task (4), the student is asked to add a title and a selv-closing link elements to the head element; a minor mistake was made that would stop the student form passing the checkpoint, even if his/her asnwer were correct.
It turns up that on extra (/) is added at the end of the was suppose to be the “correct answer” for the link part, makeing the pass of this point impossible with the right answer. I’ve included a screen shot for clarifcation.
Please post your actual code and a link to the challenge. Thanks
According to the screenshot, you pasted, there was no error as far as I can observe.
The code I tried to pass with was the following:
<link type="text/css" rel="stylesheet" href="styles.css">
I used MDN’s HTML documentation as a refrance: https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/The_head_metadata_in_HTML
Here is the url I was looking for you to provide:
If that is the full code you tried to use then you missed many of the instructions:
Step 4
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.
I see no title element.
Are you talking about this bug:
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)
2 Likes
Yes! That was exeaclty the point I was trying to make. It makes more sense now. Thank you so much, Jeremy!
I had no idea that a ( / ) could be a part of a selv-closing tag, at least not before this incident.
system
Closed
October 31, 2022, 1:07am
9
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.