What is comment in CSS?

Posted by

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 single or multiple lines statement and written within /*…………*/ .

example

<!DOCTYPE html>  
<html>  
<head>  
<style>  
body {  
    background-color: linen;  
}  
h1 {  
    color: red;  
    margin-left: 80px;  
}   
</style>  
</head>  
<body>  
<h1>comment  </h1>  
<p>Internal CSS is used to apply CSS on a single document or page. It can affect all the elements of the page. 
It is written inside the style tag within head section of html</p>  
</body>  
</html> 

output

Comment

Internal CSS is used to apply CSS on a single document or page. It can affect all the elements of the page. It is written inside the style tag within head section of html

guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x