Search code examples
htmlgoogle-chromecommentsgoogle-chrome-devtools

How to hide html comments in chrome dev tools?


In Firebug, there's an option to toggle/view HTML comments:

toggle HTML comments in Firebug

Is there any way to do this in Chrome Developer Tools?


Solution

  • I would like to give a more detailed answer to this question. Note that this answer corresponds to chrome version - 56.0.2924.87 (64-bit).

    Let's take a demo site - Django Demo Projects.

    On inspection you can see that there are a few comments near the top: enter image description here

    Click the Customize and control DevTools option (the three dots near the top right corner): enter image description here

    Select the settings option. You should be able to see Show HTML comments: enter image description here

    Disable to Show HTML comments to remove comments. Now all comments are hidden! enter image description here

    Thank you!