Languages
[Edit]
EN

HTML - comment tag example

3 points
Created by:
Kevin
797

In this short article we would like to show you how to comment HTML code.

Quick solution:

<!-- 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:

// ONLINE-RUNNER:browser;

<html>
<body>
  <!-- This is a single-line comment -->

  <p>Only this paragraph will be displayed </p>

  <!--   
    This is 
    a multi-line 
    comment.
  -->

  <!-- 
    <p>You can also comment a block of code</p>
  -->
</body>
</html>

Alternative titles

  1. How to comment HTML code
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

HTML

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join