How to deal with HTML Comments

In this article I will explain the comments in HTML.
  • 2162


Comments are a part of the HTML code and is used to explain the code. Comments always start with <!-- and end with -->. This tells the browser when a comment begins and ends.

We can add the comments by using the following line

<!-- We can write the comment as -->



    <title>HTML Example</title>



    <!--use of bold tag  -->

    <b>Bold</b><br />

    <!--use of italic tag-->

    <i>Italic</i><br />

    <!--use of underline tag-->

    <u>UnderLine</u><br />







Comments in HTML are just for giving useful information to the reader that what does mean a particular line we are writing. From the above example it is clear that the comment "use of bold tag" is clarifying that we are using bold tag in our program. Similar for the other comments using in the program. Their purpose is to direct the user or reader just to give guidance that why we are using that particular line.

Ask Your Question 
Got a programming related question? You may want to post your question here


More Articles

© 2020 DotNetHeaven. All rights reserved.