A CSS comment is text that is marked as documentation.
Comments are for developers only. They are not visible to the users.
Comments are written with /* ... */ and span one or more lines.
A comment inside a <style> element.
<style>
/* Styling for a message box */
.message {
background: moccasin;
padding: 20px;
}
</style>
Comments can span multiple lines, like so.
<style>
/*
A multi-line style.
That can span many lines.
*/
.message {
background: moccasin;
padding: 20px;
}
</style>
Below is a commonly used flowerbox commenting style.
<style>
/***********************************************
* A flowerbox commenting style
*
* 1) detail one
* 2) detail two
*
***********************************************/
.message {
background: moccasin;
padding: 20px;
}
</style>
And this is another neat commenting style.
<style>
/*
* A neatly arranged commenting style
*
* 1) detail one
* 2) detail two
*
*/
.message {
background: moccasin;
padding: 20px;
}
</style>