HTML Comments

HTML Comments

HTML comments are used to add notes or explanations in your code. Comments are ignored by the browser, so they do not appear on the webpage.

They help developers understand or remember code later.


Syntax


 


Example Code


 


Output Preview

Welcome to HTML
This is a paragraph of text.

(No comments are visible.)


Why Use Comments?

✔ Make code easier to understand
✔ Add temporarily disabled code
✔ Add reminders for future updates


Example of disabling code:


 


Comments help keep your code clean, organized, and readable.

CodeCapsule

Sanjit Sinha — Web Developer | PHP • Laravel • CodeIgniter • MySQL • Bootstrap Founder, CodeCapsule — Student projects & practical coding guides. Email: info@codecapsule.in • Website: CodeCapsule.in

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *