CSS Comments

In CSS, comments are used to add explanatory notes or to temporarily disable parts of the CSS code without affecting the browser's rendering of the page. Comments help make your code more readable and maintainable, especially when working on large stylesheets.

Syntax:

/* Content */

Single-line Comment Example:

/* This is a comment in CSS */
p {
color: blue; /* This is an inline comment */
font-size: /* This is an inline comment */ 20px;
}

Try it yourself


Multi-line Comment Example:

/*
This is a longer comment.
It spans multiple lines.
*/
h1 {
color: red;
}

Try it yourself


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.