+ 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
3 Respuestas
+ 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
+ 1
thank you for answering