Skip to content
HTML Comment doubt
Profile icon
Lanna

This file cannot be displayed: https://storage.googleapis.com/replit/images/1560794335776_99dfaefc9502121e9344fe273339173d.pn
So am I doing anything wrong in this commenting? 'Cause it ain't working, the comment is not supposed to be displayed but it is, why?

You are viewing a single comment. View All
Profile icon
hyperupcall

According to the WHATWG html spec, you seem to be commenting properly. It doesn't seem to explicitly say that Comment nodes (which is what you're actually creating when you write comments) cannot be adjacent to Element nodes. I've tried to replicate your problems, but I wasn't successful. Maybe you have some sort of repl?