Hi everyone, does anyone have a problem on step 4 “Building registration form” course?
I am sure that my answer already correct, even I change my ie (from chrome to safari), in case something wrong with my browser.
it always told me that the link element should self closing, even after I closed it
thanks for answering guys
In watching your screenshot, it looks ok, could you provide the link for this step and also share your code to copy it? Thanks in advance.
Thanks for the replay @LucLH , here is link of my course:
Thanks once again
link element should be a self-closing element.”
Sometimes you will see self-closing tags end with
/>, which is what the test is expecting in this case. So just add the forward slash at the end and it will pass.
I’m not sure HTML5 requires the forward slash at the end of self closing tags such as
<link>. Might be something worth looking into as if it does not then this test may be too strict.
UPDATE: I don’t think it does.
18.104.22.168 Start tags, point 6:
“Then, if the element is one of the void elements, or if the element is a foreign element, then there may be a single U+002F SOLIDUS character (/). This character has no effect on void elements, but on foreign elements it marks the start tag as self-closing.”
This seems to me to be saying that the forward slash on self-closing void elements is optional.
P.S. I have opened up an issue for this.
Wow @bbsmooth thanks a lot man!
This is what happens when you let React developers teach HTML
But in all seriousness, the trailing slash is not only optional but is in fact completely ignored. You won’t (pretty sure) see examples in the specs (or MDN) with a trailing slash either. The slash is apparently required in XHTML 1.0 (which conforms with XML syntax rules).
It should in my opinion definitely not be required by the test. I will open an issue for it.
Here is what looks like some historical reference for anyone interested