So, currently looking through Responsive Web Design
I used to carry tags’ closing brakets to the next line within
<body> to prevent unwanted space between elements, like this:
<h1>Hello World</h1 ><h2>CatPhotoApp</h2>
The last test fails in this case (“Your h1 element should be before your h2 element.”); actually, if there is any spacing between a tag name and its closing bracket (so the 2nd test can be false-failed too), while the standard says it’s OK (§184.108.40.206.5, §220.127.116.11.4).
I’m not sure if this
https://github.com/freeCodeCamp/freeCodeCamp/blob/main/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/headline-with-the-h2-element.md (2 links max for new users) file directly configures the challenge, but the patterns in the asserts apparently doesn’t allow the aforementioned whitespaces. Seeing how they’re case-insensitive and space-indulgent with tags’ inner text, they should be standard-friendly as well.
I assume this style of tests isn’t unique to this particular challenge. I see some DOM checks in the asserts; maybe they should be used more widely.
P. S. Great thanks for saving post drafts! Chrome’s main process making a suicidal dive into the page file happens to be quite annoying.