- Get link
- X
- Other Apps
Comments in CSS
Comments are used to explain your code, and may help you when you edit the source code later. Comments are ignored by Browsers. Comments are written for understanding code. Someone else wants to read your code, then with comments it becomes easy to understand the code. Writing comments is a good practice.
Syntax:
/*Comment goes here*/
CSS uses comments to give details about the code. For example, the following comment is used after color attribute.
The CSS:
p{
color:green;
/*This is a comments*/
font-size:150%;
}
Result:
Comments can also span multiple lines.
Comments
Post a Comment
If you have any doubt, ask here