Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do HTML comments in NetBeans

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?

like image 586
underscore666 Avatar asked Apr 26 '12 09:04

underscore666


People also ask

How do I comment out a block in NetBeans?

If we want to comment out a block of code in NetBeans IDE, we can simply use [ctrl]+[shift]+[c] . First we want to select block of code & then apply [ctrl]+[shift]+[c] on it. To remove comments, we can use same key combination.

How do you write comments in HTML?

In HTML, a comment is text enclosed within < ! ╌ ╌> tags. This syntax tells the browser that they are comments and should not be rendered on the front end. Thanks to the comments tag, you can leave notes to remind yourself where you left off in the build process.

What is shortcut for comment in NetBeans?

Try this combination in the Netbeans Editor: ctrl + shift + c.


1 Answers

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.

like image 117
Jonathan Spooner Avatar answered Nov 09 '22 01:11

Jonathan Spooner