Search On Google

Saturday, December 29, 2018

HTML comments

What is comment in HTML?

With comments you can easily make mark in your HTML.
Comments make you feel better for debugging , because you can easily search lines of code on demand.

Following syntax is for insert comment in HTML:-
<!-- Write your comments here -->

Example1:- Now image will be hide because it will be commented.
<!--
<img src="avtar.png">
-->

Example2:- Paragraph here will not hide because here we putting only information by using 2 seperate comment tags without commenting our paragraph.
<!--start paragraph-->
<p>
Hi this is my paragraph. I am a good person.
In this paragraph example you are learning how to comment
for making debugging in further maintenace or adding some functionality on web page.
</p>
<!--End paragraph-->


Try HTML Comment Example in Editor

No comments:

Post a Comment

About Me

My photo
Mumbai, Maharashtra, India