views:

292

answers:

3

Is there a way to comment out a single line in HTML using just an escape sequence at the start of the line? Similar to using # or // in other languages? Or is <!-- ... --> the only option for commenting in html?

+1  A: 

No, you have to close the comment with -->.

Kyle Alons
+3  A: 

No, <!-- ... --> is the only comment syntax in HTML.

Matti Virkkunen
+12  A: 
digitaldreamer
Interesting, I never knew `<!>` was a valid comment. I'd avoid things like that just for compatibility's sake though
Matti Virkkunen
Thanks for the awesome and exhaustive answer. I didn't think there was a way to do it, but figured it couldn't hurt to ask, and now I know a lot more about comments, and also to avoid `<!-- -------blah------ -->` which I had thought was alright since there was a space between the start and end '--'s.
aslum