What is the use of comments in HTML? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

What is the use of comments in HTML?

15th Dec 2017, 5:39 AM
Calimari
Calimari - avatar
2 Answers
+ 8
They can sometimes help organize your source code. E.g. <!--begin navigation menu--> They also can help others figure out what's going on more quickly. <!-- kluge to work around bug #567890 in Firefox v57.0.2 on Android -->
15th Dec 2017, 5:51 AM
Eric Blinkidu
Eric Blinkidu - avatar
+ 4
Adding comments as your write code is a good practice, because they provide clarification and understanding when you need to refer back to it, as well as for others who might need to read it.
15th Dec 2017, 5:48 AM
Al Toe