When you are designing your website, there are many instances that require you to comment out code in your website. Commenting code is good for diagnosing website problems, hiding code instead of deleting the code, placing notes in a file to explain what was done, and many more reasons. This article will explain the basics of commenting code in your website files.
HTML comments are specifically designed to comment out code when you are in an HTML coded document. Below is the syntax for HTML comments.
Example of an HTML comment
An Example of a usage of this is shown in the following code.
A paragraph in your site
Single Line comment
Multiple Line comment
Example of PHP comment
// This is a comment on one line echo '
HTML code echoed by PHP.'; /* This is code commented out echo '
An HTML Title from PHP'; echo '
HTML code echoed by PHP.'; */ ?>