How to do HTML comments in NetBeans

underscore666 picture underscore666 · Apr 26, 2012 · Viewed 9.6k times · Source

In NetBeans, for javascript and php files/code, you can easily comment lines of code by just selecting them and then clicking on the comment button as shown in this picture.

enter image description here

Is possible to perform the same action for HTML code? If yes, how?

Answer

Jonathan Spooner picture Jonathan Spooner · Apr 26, 2012

To comment out html code (and javascript/php code), select the section of code you want to comment out and use the Ctrl + Shift + C (Cmd + Shift + C for Mac) keyboard shortcut. For html code this adds the <!-- --> tags around your code.

To uncomment, select the commented code and use the same keyboard shortcut. This will remove the comment tags.