EN
HTML - comment tag example
3 points
In this short article we would like to show you how to comment HTML code.
Quick solution:
xxxxxxxxxx
1
<!-- Comment body -->
Below example shows various uses of comments, like single-line comments, multi-line comments or how to comment a block of code.
Practical example:
xxxxxxxxxx
1
<html>
2
<body>
3
<!-- This is a single-line comment -->
4
5
<p>Only this paragraph will be displayed </p>
6
7
<!--
8
This is
9
a multi-line
10
comment.
11
-->
12
13
<!--
14
<p>You can also comment a block of code</p>
15
-->
16
</body>
17
</html>