Highlighted

HTML Comment Tags

Community Beginner ,
Mar 09, 2019

Copy link to clipboard

Copied

I am a beginner in dreamweaver and am looking to add a comment tag for my index page. I can't find a comment tag in any of the insert menus. I tried manually typing in the code <!--comment tag is supposed to go here--> but dreamweaver doesn't recognize that as code. Does anyone know how I can add a comment tag into my HTML page?

Adobe Community Professional
Correct answer by John Waller | Adobe Community Professional

<!--comment tag is supposed to go here-->

Add a space before "comment" and after "here".

<!-- comment tag is supposed to go here -->

Tip: always double-check that all your HTML comments are correctly closed with a " -->".

It's a common error which can render your entire page code invisible if the browser thinks the rest of the page is all one big HTML comment because you forgot to close a comment at the top of the page.

Views

538

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

HTML Comment Tags

Community Beginner ,
Mar 09, 2019

Copy link to clipboard

Copied

I am a beginner in dreamweaver and am looking to add a comment tag for my index page. I can't find a comment tag in any of the insert menus. I tried manually typing in the code <!--comment tag is supposed to go here--> but dreamweaver doesn't recognize that as code. Does anyone know how I can add a comment tag into my HTML page?

Adobe Community Professional
Correct answer by John Waller | Adobe Community Professional

<!--comment tag is supposed to go here-->

Add a space before "comment" and after "here".

<!-- comment tag is supposed to go here -->

Tip: always double-check that all your HTML comments are correctly closed with a " -->".

It's a common error which can render your entire page code invisible if the browser thinks the rest of the page is all one big HTML comment because you forgot to close a comment at the top of the page.

Views

539

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Mar 09, 2019 0
Adobe Community Professional ,
Mar 09, 2019

Copy link to clipboard

Copied

<!--comment tag is supposed to go here-->

Add a space before "comment" and after "here".

<!-- comment tag is supposed to go here -->

Tip: always double-check that all your HTML comments are correctly closed with a " -->".

It's a common error which can render your entire page code invisible if the browser thinks the rest of the page is all one big HTML comment because you forgot to close a comment at the top of the page.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 09, 2019 2
Community Beginner ,
Mar 29, 2019

Copy link to clipboard

Copied

Thank you so much!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 29, 2019 0
Adobe Community Professional ,
Mar 10, 2019

Copy link to clipboard

Copied

Go to your Snippets folder --  Window > Snippets (Shift + F9) for re-usable code  that you insert into documents with a double-click.  Optionally you may create a custom trigger  followed by the Tab key.  See screenshot.

If what you need isn't already in your Snippets, you can create new ones with tools in the panel's bottom right corner.

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 10, 2019 1
Adobe Community Professional ,
Mar 11, 2019

Copy link to clipboard

Copied

HTML comments aren't supposed to be recognized as anything but a comment in the HTML.

The white space doesn't matter, either...

<!--comment tag is supposed to go here-->

or
<!-- comment tag is supposed to go here -->

...will act as an HTML comment. HTML Comments are only supposed to display within the code itself as a message to the person viewing the code. They have no visual display in the browser or in DW's Design and Live Views.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 11, 2019 2
Adobe Community Professional ,
Mar 11, 2019

Copy link to clipboard

Copied

There is a Dreamweaver setting in preferences > show invisible elements > show: comments. Its supposed to show a small icon in design view that represents the comment but it doesn't show the actual comment persay. In DW CC 2015 the icon looks like this in design view on a white background:

comment_icon.jpg

However, in Dreamweaver CC 2019 you can't see the icon on a white background in design view because the comment icon appears to be white which is strange given most backgrounds would be white I would have thought?....

One of the issues here is Adobe wanted to phase-out Design View and replace it with live view, problem is live view suffers from a lot of performance issues and glitches etc  .... and once you understand desgn-time stylesheets and how to set them up for a 'working enviroment' design view is much easier to use than live view (my opinion anyway) ....

Paul-M, ACP

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Mar 11, 2019 2