HTML Comment Tags

Community Beginner ,
Mar 09, 2019 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?

Views

896

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
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 09, 2019 Mar 09, 2019

<!--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
Community Expert ,
Mar 09, 2019 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
community guidelines
Community Beginner ,
Mar 29, 2019 Mar 29, 2019

Copy link to clipboard

Copied

LATEST

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
community guidelines
Community Expert ,
Mar 10, 2019 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, Product User & Community Expert
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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
community guidelines
Community Expert ,
Mar 11, 2019 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
community guidelines
Community Expert ,
Mar 11, 2019 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
community guidelines
express Get Adobe Express free

Easily make social graphics, flyers, logos, and more from thousands of free templates.

Get free app
Free to use, no credit card required