Dreamweaver

Insert HTML comments

A comment is descriptive text that you insert in HTML code to explain the code or provide other information. The text of the comment appears only in Code view and is not displayed in a browser.

Insert a comment at the insertion point

 Select Insert > Comment.

In Code view, a comment tag is inserted and the insertion point is placed in the middle of the tag. Type your comment.

In Design view, the Comment dialog box appears. Enter the comment and click OK.

Display comment markers in Design view

 Select View > Visual Aids > Invisible Elements.

Make sure that the Comments option is selected in the Invisible Elements preferences or the comment marker does not appear.

Edit an existing comment

  • In Code view, find the comment and edit its text.

  • In Design view, select the Comment marker, edit the comment’s text in the Property inspector, and then click in the Document window.