Comments are ignored by web browsers. Comments are used to explain the code, and comments may help you edit code at a later time. Comments do not affect the code.
Single line comment is used to hide a single line of the source code.
<style>
/*comment*/
/*h1{color:red}*/
p{background-color:green;/*height:500px*/}
</style>
We can use Multiple lines comment to hide multiple lines of source code.
<style>
/*multi-line comment*/
/*h1{color:red}
p{background-color:green;height:500px}*/
</style>
<!DOCTYPE html>
<html>
<head>
<style>
/*single line comment*/
/*h1{color:red}*/
/*multiple lines comments*/
/*p{background-color:green;height:500px}
h1{color:pink}*/
h1{color:green}
</style>
</head>
<body>
<h1>Hello world!</h1>
</body>
</html>