why we use this element in html? what is the purpose?? <!-- comments --> | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

why we use this element in html? what is the purpose?? <!-- comments -->

25th Nov 2016, 5:20 AM
Chinthy
Chinthy - avatar
3 Antworten
+ 5
For comment in your code. Suppose you have written a heavy code(large code) in html. You cannot remember everything you comment for remember what is the purpose of this line. Again if you work in an company, you have write their front end of website only html. A new guy/girl get the same job and how do he know what is the purpose of that line.
25th Nov 2016, 5:32 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 1
the code between <!-- and --> is not read by the computer, those tags are used to add comments for when other people read your code
25th Nov 2016, 5:24 AM
Wagner Silvestre Wuchryn Martins
Wagner Silvestre Wuchryn Martins - avatar
+ 1
to add notes for yourself or other developer about your markup without disturbing (not being visible) in your webpage on browser.
25th Nov 2016, 11:24 AM
Shayan
Shayan - avatar