How does a browser render HTML comments?

  • It displays them as regular text. 
  • It highlights them for user attention. 
  • It ignores them and doesn't render them. 
  • It renders them with a special icon. 
Browsers do not render HTML comments. They completely ignore them. The main purpose of comments in HTML is to allow developers to leave notes in the code for themselves or others, without affecting how the code runs or how the document looks to the end-user. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *