I cannot go any further because of this bug. In the “Learn HTML Forms by Building a Registration Form” in the recently launched (New) Responsive Web Design, the task tells me to add a self closing link. It continues " Give it a
rel attribute value of
stylesheet , a
type attribute value of
text/css , and an
href attribute value of
I have done EXACTLY that. It double, triple checked. It is 100% correct. However, when I submit the code, I receive a check my code and " Your
link element should be a self-closing element."
Everything on that page is 100% correct. Including the text for the title, etc.
There must be some bug on the code.
June 23, 2022, 9:32am
Can you share your full code?
June 23, 2022, 10:56am
you need to write the self closing element as
It’s a small bug that is being ridicolously difficult to fix
08:56PM - 22 Feb 22 UTC
NOTE: If you're reporting a security issue, don't create a GitHub issue. I
… nstead, email email@example.com. We will look into it immediately.
## Affected page
There are most likely other steps affected as well.
The test for this step fails if the `<link>` tag does not include the forward slash before the ending `>`. According to [whatwg.org 220.127.116.11 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)
December 22, 2022, 10:57pm
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.