+ 2

html ==> <!--hidden comment--> or <!hidden comment>

i just tested <!--hidden comment--> and <!hidden comment> on html but the result was the same. what is the diffrence between these two ? https://code.sololearn.com/WZbFS2IpkJ7i/?ref=app

12th Mar 2019, 8:36 PM
Mahdi Dehghani
Mahdi Dehghani - avatar
3 odpowiedzi
+ 1
<! is used for linking documents to the HTML <!DOCTYPE> Yes the statement is ignored and not shown in your web-page, but it is not a comment tag. It is a tag that can be used to link other documents to your HTML. The sololearn playground does not complain. I used notepad, give it a .html - extension and open it with a browser, there is not a complain. I check it with a online html checker, I get a message "bogus comment" So please use <!-- comment--> for comments If I do the same for "no end tag" Even the online html checker does not complain, so apparently this is valid. (did not no that) I do find it bad practice though
13th Mar 2019, 11:00 AM
sneeze
sneeze - avatar
+ 1
thank you for answering
13th Mar 2019, 2:46 PM
Mahdi Dehghani
Mahdi Dehghani - avatar