What about html comment??

Can we use html comment codes instead to js code because that's pretty easy to learn and remember.I am not saying that it's difficult to remember but only asking if we can use html comment instead of this...If it can then it would be good thing...

2/11/2019 4:57:48 PM

Mr. Anonymous

9 Answers

New Answer


<!-- this is a comment --> this is correct in HTML but this doesn't exist in JavaScript. In JavaScript use //for a single line comment Example :- // this is a comment and if in any case you need to comment out multiple lines of codes use /* ..... this is a comment..... */


Hey Check Out My Code So You Will Understand!👍 Here: ⬇️⬇️⬇️ https://code.sololearn.com/WfVFvaK46ZRi/?ref=app


Html comment give line within to paragraph it's so useful for divide two line..... ❤


Do you mean html comments within JS code?


These are the comments that can be used in a html doc. <!-- HTML comment --> //js comment /*js comment*/ /*CSS comment*/


HTML : <!-- text --> Js : // text Css: /* text */ Happy Coding 💖😇


You can try to use it) <!-- --> enjoy it)


<!-- this a comment & it will not show in --> <!-- --> it good for hint,note, something to leave to another coworker or yourself. :)


You mean <!-- something --> in JS? I don't think so.