+ 1
Why we use <!--this is a comment-->? And what the benefit from tis tag?
8 Answers
+ 4
Comments are good to read codes for you and other people.
+ 11
<!-- commenting used to explain your code which can help you edit the code later ! they are useful if you have lot lines of code -->
+ 6
it doesn't really help the browser, but moreso you and the person who is reading it
+ 5
there is no benefit for the browser but if you have multiple people making the website or you leave it for a few months and then come back it will happen you know what does what
+ 4
i use the comment tag to leave notes, instructions to other people when making a code. its not necessarily mandatory to use it but it makes the code a bit easier to read. also, you can leave notes before and after a line of code. it makes it easier to put together as well
+ 2
If you forget what a determinate code does comment can help you
+ 1
for the browser
+ 1
I'll amend to the answers, but when I'm testing locally, and cannot be bothered to use PHP, etc. at that time, using <!-- --> can allow me to comment out HTML which I am unfinished with, or I need to debug something else for CSS / Javascript.
EDIT 2018/09/19 PDT: It also allows me to comment out incomplete `<script>` tags (to prevent errors), or otherwise help isolate a bug when it comes down to which `<script>` is the cause.