Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It looks like the comment tag isn't included. (Not sure whether it should be. Not even sure the proper way to identify it, I suppose a single "!")


I would have said !-- is the tag name of that, though with the closing part requiring a double dash as well, it's rather unique and maybe not a proper tag... could have included it in a bonus list though, not counting it towards the total but showing it as a bonus entry at the top of your findings


In html 2.0 the definition makes a bit more sense than what the definition in the newest whatwg spec.

https://www.rfc-editor.org/rfc/rfc1866#section-3.2.5

Basically <!> was valid, and -- only served as the start and end of a comment, and between <! and > you could have multiple "comments", example from the rfc:

  <!-- another -- -- comment -->
In the current spec it is basically defined as starts with "<!--" and closed by "-->".

https://html.spec.whatwg.org/#comments


In the DOM, comment nodes are not elements, they're their own type of node altogether. Their .nodeName is `#comment`, for what it's worth.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: