+ 2
what is use of comment tag
5 ответов
+ 5
comment tag does not display in browser.. so we can use it for future to understand what we have did in HTML code, it means we can use it for reminder..
for ex..
<!-- this is a heading -->
<h1>......</h1>
whenever u see the code in future u will understand that this is a heading..
pls like if it helped u..
+ 2
Comment tags are generally for humans to read and understand. We use it to explain in normal human terms what certain parts of the code do. Sometimes, even you the coder may write some clever block of code which few months later, you may not exactly remember what or why you did what you did. But if you left a comment there, you could save yourself and anyone else the trouble of trying to figure out what you were thinking when you wrote your genius block of code.
+ 1
In simple words comment tags help the developer to create notes or remainders for themselves that won't be displayed in the output.
+ 1
<!-- comment --> comment r used for code description in the code to understand what is going on in code
0
<!--comment tag-->