What is Computer

Module: M3-R5: Python Programming

Chapter: Ch1 Computer Intro

HTML Comments (<!-- -->)

HTML comments are used to add notes or explanations within the code that do not appear on the web page. They are helpful for developers to understand the code or temporarily disable sections.

Syntax:
<!-- This is a comment -->
Examples:

Example 1: Simple Comment

<!-- This paragraph is for main content -->

Example 2: Disable Code Temporarily

<!-- <p>This paragraph is hidden</p> -->

Example 3: Multi-line Comment

<!-- This is a multi-line comment Useful for detailed explanations -->
Important Notes:
  • Comments are ignored by the browser and do not affect page rendering.
  • Always close comments properly with --> to avoid breaking HTML.
  • Useful for leaving notes, organizing code, or temporarily disabling elements.
  • Avoid putting sensitive information inside comments.
Quick Links