Is it possible for HTML and/or CSS comments to cause rendering problems?
HTML Comment : <!-- some info -->
CSS : /* some info */
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The comments you have shown wouldn’t cause any display issues but if you do:
You can run into problems with Firefox. This is because two dashes signal the end of the comment and the > is the end comment marker. So technically this is valid:
So what can happen is that your comments aren’t ending where you think they should and so some content remained commented out, or the comment displays on the page.
More detail can be found here:
http://weblog.200ok.com.au/2008/01/dashing-into-trouble-why-html-comments.html