Courses Job Ready Fresher Training AI for Class 7 to 12 Corporate Training Placements Tutorials
Free Learning Resources

IT Tutorials & Interview Prep

Free guides, interview Q&As, and job responsibility breakdowns — curated by industry veterans to help you crack MNC interviews

109+
Tutorial Articles
9
Topic Categories
100%
Free to Read
← Back to HTML

HTML Comments

HTML Last Updated: Dec 16, 2025

1. HTML Comments

Definition

HTML comments are used to add notes or explanations inside HTML code.
They are not displayed in the browser.

Comments help:

  • Developers understand the code
  • Temporarily disable code
  • Improve readability

Syntax

<!-- This is a comment -->

Example

<p>This text is visible</p>

<!-- This text will not appear on the webpage -->

<p>This is another paragraph</p>

Output

Only this will be shown:

This text is visible

This is another paragraph

Uses of HTML Comments

  • Explaining code
  • Debugging
  • Hiding content temporarily
  • Team collaboration

Important Points

  • Comments start with <!-- and end with -->
  • They do not affect page output
  • Cannot be nested
Want to practice these scenarios in a real IT environment? Our 45-Day Internship Program gives you hands-on experience with Active Directory, Ticketing Tools, and Networking.
Join the Internship →