We have already seen that HTML code you write gets converted into an interactive page in a website.
<html>
<body>
<p>Hello World</p>
</body>
</html>
However, there are scenarios where you want to write a piece of text or comments in HTML and not get it rendered in a webpage. It is possible using <!-- -->.
Whatever you write inside <!-- and --> doesn't get displayed in the webpage.
<html>
<body>
<!-- This text doesn't get displayed in the webpage -->
<p>Hello World</p>
</body>
</html>
So, as you can see in the above example, the text This text doesn't get displayed in the webpage doesn't get displayed in the webpage. Because it is inside <!-- and -->.
<!-- This text doesn't get displayed in the webpage -->
And this is how you can write comments that doesn't get displayed in the webpage.