Discrepancies in closing <link> elements between courses

I try to do plenty of research before asking questions but I believe I’ve found a discrepancy amongst the first HTML courses including the Cafe Menu, Colored Makers and Registration Form.

The Cafe Menu and Registration form want you to close the link element with “/>” which after researching I believe is incorrect. The Colored Markers course closes the link element with simply “>”. After a quick google search w3schools’ example uses only “>”. If I’m wrong or there are two ways of closing the element please let me know.

As far as the new curriculum, I love it. I’ve already completed the old HTML courses and have been working through the projects the last couple weeks. I was disappointed at first to see it had changed but I actually started over going through the courses again and the new format of completing a project after each set of courses rather than doing all the projects at the end is so much easier! I also much prefer doing the lessons in the text editor and seeing the entirety of the code come together. I’m retaining the information better than I was and I can guarantee I’m writing cleaner and better formatted code this time through.

Also thank you to everyone at FCC for giving this out for free and getting the curriculum back up and going! You all are great!

  **Your code so far**

<!DOCTYPE html>
  <title>Registration Form</title>
  <link rel="stylesheet" type="text/css" href="styles.css">
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Step 4

Link to the challenge:

This has been fixed and should be in production soon

1 Like

Thank you! Just for clarification what is the correct closing?

The test for this step fails if the <link> tag does not include the forward slash before the ending > . According to whatwg.org 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 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:

No slash needed or used in practice.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.