Skip to content
HTML Comment doubt
Profile icon

This file cannot be displayed:
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

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?