Sunday, 17 February 2019

How to Write Comment in HTML

             Code To Add Comment in Html


Syntax to ADD comment in HTML is 


<!--   This is a Comment -->.




HTML comment begins with <!--   and ends with -->   .In between this tag you can write your comment.
And this comment will not be visible on web page in browser. IF you want to view the comment you have to check the source code of that web page.

So, a programmer can add some statements in comment tag for his own reading. 



EXAMPLE:-
1. Open a notepad file and copy the given code.


<!DocType HTML>
</HTML>
<Head><Title> How to Add Comment in HTML


</Title>
</Head>
<Body>
<p>This is a Paragraph
</p>
<H4>This is Heading Tag</H4>
<!-- This is a Comment Tag -->
</body>

</HTML>

2. Now save the file with .html extension and open the webpage in any browser.

3. The webpage will look like this:-

No comments:

Post a Comment

👇 🌐 Top 10 Hosting for Developers in 2025: Fast, Reliable & Affordable

 Whether you’re a beginner building your first portfolio site or a professional developer deploying client projects, choosing the right host...