Can we add the comments any were in the html code ! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can we add the comments any were in the html code !

21st Sep 2021, 5:32 PM
Bereket
5 Answers
+ 2
Yes! You can add comments any where in the HTML code. <!-- This is under comment --> edit:- you can't use inside tags and inside comment itself.
21st Sep 2021, 5:38 PM
Saurabh
Saurabh - avatar
+ 2
Yes u can add anywhere But not inside tags and inside a comment itself for example: <div <!-- hello --> ></div> not valid <!-- <!-- -->--> not valid
21st Sep 2021, 5:42 PM
Pariket Thakur
Pariket Thakur - avatar
+ 2
Yeah ,but make sure that comments do not nest which means a comment cannot be put inside another comment. Second the double-dash sequence "--" may not appear inside a comment except as part of the closing --> tag. You must also make sure that there are no spaces in the start-of comment string. (for example < !--comment--> is not valid)
21st Sep 2021, 6:39 PM
Hasnae BOUHMADY
Hasnae BOUHMADY - avatar
+ 2
Yes, <!-- HTML comment -->, in others lenguages of programming Is diferent
9th Oct 2021, 1:58 PM
CGO!
CGO! - avatar
+ 1
Literally yes.
23rd Sep 2021, 2:37 PM
MD. Jashim Uddin
MD. Jashim Uddin - avatar