Page Nav

HIDE

Grid

GRID_STYLE

Classic Header

{fbt_classic_header}

Latest:

latest

Write comment in HTML page

HTML page  comment We write comment in HTML page for many reasons such as finding the codes in future updating case, for understanding you ...

Write comment in HTML page

HTML page  comment


We write comment in HTML page for many reasons such as finding the codes in future updating case, for understanding you can write short note. Comment in HTML page is such a thing that will be written in the text documents but after opening that .html file by a web browser nothing will show which are in the comments.

It is a good practice writing comments in HTML pages. Developer will understand these code easily and will be able to know the codes used reasons.

HTML Comment opens with <! And closes with >.
That means it's structure is-

<! It is a comment>

Example: We will write a comment and it will not show in the web page.


<DOCTYPE html!>
<html>
<head>
<title>Background color showing</title>
</head>
<body>
Comments will not show in the web page. Here is the comment.

<! It is a comment>

</body>
</html>

Opening the .html file with a browser we will find result like this-

Write comment in HTML page

No comments