By commenting the code, you can leave reminder messages and explanations for yourself as well as other code writers who will be working on the HTML page. The comments feature can also be used to quickly disable a piece of code when you're testing or working on a new feature that isn't ready. By learning how to use comments well, both you and your coworkers can write code more efficiently.
Step
Step 1. Enter a single line comment
Comments are enclosed by and. You can include a short comment to remind what is going on in the code you are working on.
Comment testing This is a site
Make sure there are no spaces in the comments. For example, < !-- will not activate the comment function. Within the area enclosed by the mark, you can add as many spaces as you want
Step 2. Create a multiline comment
Comments can be lined up so that they are useful for explaining complex code or disabling large sections of code.
Comment testing Comments can be written as long as you want. Any posts in the uncomment will not affect the code on the page.This is a site
Step 3. Use the comment function to quickly deactivate the code
If you're trying to find an error or want to prevent code from running on a page, you can use the comment function to quickly disable code. That way, you can revert the code by uncommenting it.
Comment testing Check the following pictures
Hide pictures for now
Step 4. Use the comment function to hide the script in browsers that don't support a certain code
If you're writing a program in JavaScript or VBScript, you can use the comment function to hide the script in browsers that don't support running it. Enter a comment at the beginning of the script, and end it with // to ensure that the script works in supported browsers.
VBScript