How to comment in HTML


If you want to add some note to your HTML code or just hide some part of your code you can use comments.

Comments in HTML starts with <!-- and ends with -->. See examples below:

Example of one line comment in HTML

<!-- this is comment -->

Example of multiline comment in HTML

<!-- this is 
multiline
comment in
HTML -->

By: Tomas Silny
Edited: 2020-11-06 19:23:14