+ 1
What is html comments what does it do what is it use for??
8 Respuestas
+ 5
Its not necessary to use it. Its just that you can do it if u wish, for any reason.
+ 4
Comments are just some lines that a programmer can add inside the code but that line isn't read while executing the code coz that is just a comment, its usually used to explain some parts of codes or plan certain areas for coding later such as,
<h1> HELLO WORLD </h1>
<!-- This is a heading -->
<!-- I have to add a paragraph later -->
the second and third lines r comments, its just to explain things.
+ 3
Its for your own organization and rememberance incase u are making a very long code
<!-- insert CSS here -->
<!-- headers should be yellow with green background -->
Also if you are to post a code for others to learn from, then you need to include the comments for explanation
<!-- i used dropbox to insert this image from my phone gallery -->
Act as guidelines for your code viewers
+ 2
So it is for myself to remind me?
+ 2
Ohh thank you for your help 😃
+ 2
I often use it to separate different parts of page if I am not using semantic tags there.