HTML Comments
In this lesson, we will learn how to add comments in HTML. Comments are useful for leaving notes or explanations in the code that are not displayed on the web page.
What are HTML Comments?
HTML comments are text that is not displayed in the browser but is visible in the source code. They are used to provide explanations, notes, or reminders for developers working on the code.
Almost every programming language has a way to add comments, and HTML is no exception.
How to Add Comments in HTML
To add a comment in HTML, you use the following syntax:
<!-- This is a comment -->
Comments can be used to provide descriptions of the code, explain complex sections, or leave reminders for yourself or other developers. Or, as most often used, to temporarily disable a piece of code without deleting it. To be fair… 99% of the time, comments are used to disable code. 🧑🏿💻
MOVING ON…