# Commenting

When programming, it is often useful to comment (adding certain tags around or in front of text to mark it as non-code) or uncomment (large) sections of text. Notepad++ allows the addition of two types of comments:

- Single line comments, which means adding a special tag in front of each line of (selected) text.
- Block comments, which means putting special tags around the selected text.

Notepad++ can also remove line comments from text, or toggle them (adding them where absent and removing them where present). These options are available from the Edit menu or the Context Menu (see the section about the Context Menu for more details).

- To add line comment tags, select Edit->Comment/Uncomment->Single line Comment.
- To remove line comment tags, select Edit->Comment/Uncomment->Single line Uncomment.
- To Toggle tags for all selected lines, select Edit->Comment/Uncomment-> Toggle Single line Comment
- To add block comment tags around the selected text, select Edit->Comment/Uncomment->Block Comment.

- To remove block comment tags around the selected text, select Edit->Comment/Uncomment->block Uncomment.

Note that if a line comment starts in column 1, and you toggle line comment on a range of lines that contains the line, the line will be uncommented, which is not usually desired. This behaviour is difficult to avoid.