I am working on SharePoint designer to customize page layout in SharePoint 2013

Is there any way to comment and uncomment code like visual studio buttons?

2 Answers 2


The SharePoint Designer is not considered a dedicated Code editor or IDE like Visual Studio, However, you can add a comment tag through

  • Keyboard shortcut Ctrl+/.
  • Or from Edit > Insert Tag > Insert comment.

    enter image description here

Note: it's not working with the JS/CSS codes. it's only for HTML code. Also, you will not able comment the highlighted code.

To add a comment on the highlighted HTML, JS, CSS codes, you can create a Code Snippet as mentioned at Comments in SharePoint Designer

enter image description here

For more details, check Comments in SharePoint Designer


No handy buttons for this, but you can just type comment codes...


  code to comment out

For JavaScript:

  code to comment out

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.