Skip to main content
Participant
June 27, 2013
Answered

Inserting HTML comments from the Insert menu

  • June 27, 2013
  • 3 replies
  • 16886 views

So I understand that the insert menu has been changed in CS6 and then again in CC  (Dreamweaver 12.2). 

http://helpx.adobe.com/dreamweaver/using/changes-insert-options-creative-cloud.html

I am using DW CC.   I want to insert HTML comments quickly in a bunch of different locations in my page code.  Is there a way to do that?

If this must now be done by hand I would like to know why.  The reason for the changes is explained as removing support for deprecated elements, but HTML comments are not deprecated in HTML 5.

http://www.w3.org/html/wg/drafts/html/master/syntax.html#comments

This topic has been closed for replies.
Correct answer guptabhawna05

There is another option. Select the block of the code and choose the comment option as per your requirement. See image below.

3 replies

m4r10c
Participant
April 22, 2016

Using keyboard shortcuts,

in command "menu", select "Modify Code", and then choose "Apply HTML comment".

(i don't know if the names are translated correctly, because i'm using the italian version of the program)

Participant
November 18, 2015

I remember back in the good old homesite days you could press shift-ctrl-m and get a comment around the block of code you have selected that would be appropriate to the code (html, css, javascript). I have no idea why this was ever removed.

Nancy OShea
Community Expert
Community Expert
November 18, 2015

Adding comments to your DW custom Snippets folder is easy.

Reuse code with Code Snippets | Adobe Dreamweaver CC tutorials

And you can associate your Snippets with custom keyboard shortcuts.

Dreamweaver Help | Keyboard shortcuts

Nancy O.

Nancy O'Shea— Product User & Community Expert
Participant
June 19, 2016

Thanks Nancy but I was talking specifically about one command that would wrap the selected text with comment delimiters appropriate to the language of the code you're currently editing.

guptabhawna05
Adobe Employee
guptabhawna05Correct answer
Adobe Employee
June 27, 2013

There is another option. Select the block of the code and choose the comment option as per your requirement. See image below.

cmackendAuthor
Participant
June 27, 2013

That is helpful - thank you!

Why would it be a toolbar option but not a menu option? Just to  leave things uncluttered?

guptabhawna05
Adobe Employee
Adobe Employee
June 27, 2013

This has been there from many versions.

I consider having it in menu was not so useful for me when I can have it just next to where I am coding.