HTML Comments

HTML comments can be done by following statement <!-- Write your comments here -->.

Please keep in mind that written comments do not display by browser. It provides help to understand the HTML source code by another developer.

General Syntax For Writing the HTML Comments:

Syntax
 <!-- Write your comments here -->;  

To comment HTML element,use following syntax <!-- Write your comments here -->

HTML Comment Example

General Syntax

    <!--
  <p>This is a paragraph having by deault margin.</p>
  <p>This is other paragraph having also by default margin.</p>
  -->    
   

Source Code

      
        <p>Below paragraph element content is commented .</p>
<!--<p>This is a paragraph having by deault margin.</p>-->      
    

Source Code: Output

Below paragraph element content is commented .

Code Explanation

Note:HTML code is commented by following syntax <!-- HTML Code --> .

Online Test / Quiz

Our Tutorials

HTML Comments
Html Tutorial HTML
Css Tutorial CSS
Bootstrap 5 Tutorial BOOTSTRAP 5
Bootstrap 4 Tutorial BOOTSTRAP 4
Materialize CSS Tutorial MATERIALIZE CSS