31

Who thought it be a good idea to use "<!---->" for comments rather than "//".

Comments
  • 4
    W3C guys
  • 11
  • 3
    @Alice i mean i understand most of the syntax requires it but considering most languages use " //" i think it makes sense to use it. Unless ofcourse there is another reason.
  • 2
    @techno848 // comments only one line
  • 13
    HTML Programmers...
  • 3
    Think how much pain it would have caused in the long run. Esp these days when some pages are one liners. Also <! - - suits the general style more I suppose.
  • 5
    Please don't tell me you don't minify your pages.
  • 1
    Havent worked much with web technologies@PrivateGER
  • 5
    </ comment />
  • 2
    /**/ this is also sorta common inother languages @rookiemaverick
  • 1
    @norman70688 mind blown
  • 4
    Uhh commenting html?
  • 2
    Why not :3@devTea
  • 2
    @devTea I comment my HTML quite a bit. It's really helpful when you're looking at stuff for the first time in a couple months to get an idea of what your original thought process is. Obviously there's no logic that needs explaining but that doesn't mean comments are unnecessary
  • 3
    Well for instance...

    <a href="//something.com/my/asset.{format}”>Something</a> would not work here :D
  • 3
    I like how the rant turned against OP.

    Seriously, it looks like you said the first thing it came up your mind, without thinking WHY it is that way..
  • 1
    <div>// Why do you even question this?</div>

    Long story short: Markup vs Code
  • 2
    Rather use a #
  • 2
    @arshcaptano

    <a href="#">#rant-tag</a>
  • 1
    @xewl oh shucks!
  • 1
    @taglia its a rant, plus i am interested in the reason behind it as well
  • 1
    @TylerDurden thats not how you rant
  • 2
    @Phlisg aaah i get it.
  • 1
    @jespersh i just meant the one used in html is hard to use at least for me
  • 1
    @techno848 if you don't know something, you have to do a research to improve your knowledge, not ranting about it.
    Just saying..
  • 1
    @taglia didnt know this was stackoverflow, its not meant to be technically right.
  • 1
  • 2
    Well from your context it sounded like you hate html comment and ask why isn’t it // instead
  • 1
    @devTea i mean i get it but its just hard to use so i dont like it or you could say i am used to the other more common way of doing it, legit didnt even think before posting i think thats how you rant :p ?
  • 1
    Shortcut for line or block comment.
    Seriously why complaining about that ?
  • 3
    @techno848 what ide did you used? There should be a shortcut to block a text and make it a comment
  • 1
    Aah never used that, i am actually working with the d3js library to display ireland's map so ofcourse there is some html, i am not using any IDE but visual studio code. @devTea
  • 3
    Vscode shortcut for commenting a block is ctrl+k+c
  • 0
    You learn new things everyday xD @devTea
  • 1
    Who comments by hand? Learn the shortcut. Ctrl / in intellij for example. Also jsx comments are probably the worst lol
Add Comment