Skip to main content Skip to docs navigation
Views 76

css-comments

Advertisments

CSS comments are generally written to explain your code. It is very helpful for the users who reads your code so that they can easily understand the code.Comments are ignored by browsers.

Comments are single or multiple lines statement and written within /*............*/ .

<!DOCTYPE html>  
<html>  
<head>  
<style>  
p {  
    color: blue;  
    /* This is a single-line comment */  
    text-align: center;  
}   
/* This is  
a multi-line  
comment */  
</style>  
</head>  
<body>  
<p>Hello kodingnotes.com</p>  
<p>This statement is styled with CSS.</p>  
<p>CSS comments are ignored by the browsers and not shown in the output.</p>  
</body>  
</html>

 

Comments