html tutorial - How to write comments in CSS - html5 - html code - html form
Answer: Use the Syntax "/* text */"
- Comments in CSS are usually used to justify the use of the design rules declarations.
- It'll help you and others to know what you were trying to do with design rules at the time of writing style sheets. Comments aren't displayed by the browsers.
- CSS comment are begins with
/*
, and ends with*/
.
See the example below:
Example
/* This is a single line CSS comment */
/* This is an example of a
CSS multi-line comment */
body {
font-family: Times New Roman, monospace;
}
p {
color: #F0F8FF;
line-height: 1.6;
}