"I am Saqib Jahangir. A passionate vlogger, software engineer, and avid traveler with a deep love for exploring the hidden gems of our beautiful planet. With a strong foundation in Application Development, Application Architecture & Database Design and Product Management, I bring over a decade of hands-on experience building secure, scalable, and resilient web applications for a diverse range of industries."

Comments in HTML

 HTML comments are used to insert notes into the HTML code. These comments are not displayed in the browser and are helpful for:

  • Describing the structure or purpose of the code
  • Temporarily disabling parts of the code
  • Leaving notes for yourself or other developers

Syntax

<!-- This is a comment -->

You can also place comments on multiple lines:

<!--

  This is a multiline comment.

  It helps explain more details in the code.

-->


📌 Example

<!DOCTYPE html>

<html>

  <head>

    <title>HTML Comments Example</title>

  </head>

  <body>

 

    <!-- Main heading of the page -->

    <h1>Welcome to My Website</h1>

 

    <p>This is a paragraph.</p>

 

    <!--

      <p>This paragraph is commented out and won't appear on the webpage.</p>

    -->

 

    <!-- Note: Don’t forget to update this section later -->

    <footer>

      <p>&copy; 2025 My Website</p>

    </footer>

 

  </body>

</html>

 

Popular Posts

Setting Up Your First Project Folder and Installing XAMPP or WAMP

Frontend vs Backend vs Full Stack