Detailed answer
Place comments between the comment delimiters.
They explain source without rendering as ordinary text, but remain visible to anyone who receives the document. Keep private notes, passwords, and tokens out of them. Comments should be short and should not be nested inside other comments.
Example
<!-- Primary navigation -->
<nav aria-label="Primary"><a href="/">Home</a></nav>
Understanding the behavior
Comments are useful for short implementation notes, but they remain available in delivered page source. A comment is not a safe place for passwords, API tokens, private customer details, or unpublished server configuration.
Practical implementation notes
Avoid nesting comments and keep comment delimiters out of the comment body. If a large section disappears unexpectedly, inspect the opening and closing delimiters before looking for CSS problems.
How to check it
Open View Source after loading the example, then inspect the rendered navigation.
Expected result
The comment is present in source while only the Home link is rendered.
Watch out: Commenting out a secret does not remove it from the downloaded source.
Read the reference ↗