Topic 9 : Comments In HTML

  • In HTML, comments are notes you can write in your code for yourself or other developers.
  • They are not shown on the website page.
  • They help you explain what your code is doing.

Syntax For Comments:

<!—  This is Syntax of Comments —>

<!DOCTYPE html>
<html lang=”en”>
  <head>
    <meta charset=”UTF-8″ />
    <meta name=”viewport” content=”width=device-width, initial-scale=1.0″ />
    <title>HTML comments(by rsportfolio)</title>
  </head>
  <body>
    <h1>Comments in HTML</h1>
    <hr />
    <!– This is comment–>
    <h2>Hi, I am Developer.</h2>
  </body>
</html>

Leave a Comment

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

Scroll to Top