Inserting comments
In HTML, a comment is text that appears in the source code of a document but is not displayed in a browser and has no effect on the appearance of the document. If you are an advanced author and work directly with source code, inserting comments is a good way to remind yourself or other authors what particular sections of the source code are for.
Comments are inserted only in HTML mode. The line of code where the cursor is will be surrounded by “<!–” and “–>” tags and turn grey. When you return to the Edit mode, you will see that it is no longer visible.
To insert a comment
- Go to the HTML window and place the cursor on the line that you want to turn into a comment.
- On the Home menu, go to the Source group and click (Insert Comment).
To remove a comment
- Go to the HTML window and place the cursor on the line that you want to turn from a comment to normal code.
- On the Home menu, go to the Source group and click (Remove Comment).