HTML Comment doubt
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?
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?