Bug in Basic CSS:Use Attribute Selectors to Style

Hello freeCodeCamp Community!
I am new here, and was going through the Basic CSS course, and in the exercise where we are taught about selecting types for CSS styling , if we have spaces , the code works but doesn’t get accepted. Like

[type |space| = |space| “checkbox”] { … }

works but doesn’t get accepted. I know it’s not that big of an issue but I was stuck here for a few mins and hope this doesn’t repeat for others.
If there is some other reason for it happening, please let me know.
Thank You :slight_smile:

Hello, Clizame.

I have moved this post to a more suitable sub-forum. For future posts, it would be a massive help, if you would use the Get Help/Ask for Help button on the specific lesson/challenge’s page, as this will create a pre-populated forum post, with your current code already formatted in it. As well as some other useful information for debugging.

Also, I think it is important to note:
The reason the code you mention works is because of how forgiving HTML and CSS are, when it comes to compiling to run.
That being said, putting spaces between the type and = is not considered good-practice as you will not find a single example like that on the Mozilla Documentation.

Hope this helps

Thanks a lot, I’ll try to confirm and research the info first before I try asking for help next time :slight_smile:

1 Like