Comments in HTML
Comments are used to document your HTML code or to prevent a specific portion of your webpage from displaying on the web.
To comment HTML source code use:
<!--comments here-->
Let's see some useful examples of using comments:
Example:
<nav>
<!-- TODO: ADD list of links -->
</nav>
Example:
<header>
<!-- <img src="./logo.png">
<p>Logo</p>
-->
<p>Heading...</p>
</header>
Here img and p tag will not be visible on the web page, while Heading... Paragraph will be visible because it is not commented.
Comments
Post a Comment