Does anybody know this element that where we can use? <!--this is a comment--> | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Does anybody know this element that where we can use? <!--this is a comment-->

25th Jan 2021, 8:27 PM
artin 5
artin 5 - avatar
8 Answers
+ 6
anything enclosed between '<!--' and '-->' will be ignored by html parser... this is usually used to comment or tag your code ;)
25th Jan 2021, 8:35 PM
visph
visph - avatar
+ 3
You can use <!--tag or comment--> to comment out any code in your html file.
25th Jan 2021, 8:29 PM
Abhay
Abhay - avatar
+ 1
for ex we dont want the html read it?
25th Jan 2021, 8:30 PM
artin 5
artin 5 - avatar
+ 1
Comments can help other people to understand your code, but they are not visible on the page.
25th Jan 2021, 8:39 PM
Lukáš Vladař
0
o so we use it for comments
25th Jan 2021, 8:30 PM
artin 5
artin 5 - avatar
0
got it tks bro
25th Jan 2021, 8:36 PM
artin 5
artin 5 - avatar
0
You can use this tag for your comments on your code!!
27th Jan 2021, 3:38 PM
K.S.S. Karunarathne
K.S.S. Karunarathne - avatar
0
Comment is completely useless for output... Comment mainly used to explain about your code in code page, not in output.... If you develop a website professionally, you wont just write the code jumbledly. You will have to sort the code so that when somebody views code, they can understand it.
27th Jan 2021, 4:16 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar