The comment element is primarily used to contain information which is used as a reference by the designer. Whatever is contained between the opening and closing comment tags is ignored by the browser and not displayed in the page content.
HTML comments start with "
<!--" and close with "
-->" and the text
of the comment is written between these two tags.
Adding comments to code makes the initial design more time consuming but the benefits far outweigh this small inconvenience. Coming
back to code that you haven't looked at for months or even years is made far easier if comments are used to explain complex code and
the meaning of variables or attributes.
Additionally, if a different designer needs to understand or alter the website, well commented code can greatly speed up the process.
<comment> element doesn't support any attributes.
CSS comments start with "
/*" and close with "
*/" and the text
of the comment is written between these two expressions.