CSS: comments
The tutor mentions a helpful feature of CSS.
Programmers are familiar with the idea of comments – code that the computer doesn’t process, but is meant for humans to read. Commenting is useful to explain what sections of code do. Another use is to comment out a section to see how the program functions without it. If, afterwards, that section is desired, it can be “uncommented”, so the computer will process it.
CSS has comments. Programmers might find them familiar:
.hh1
/*{
color:blue;
}*/
{
color:red;
}
Resulting from the CSS coding above, the tags that are class hh1 will be rendered in red. The code that suggests color:blue lies between the comment marks /* and */ so it will not be rendered.
I’ve tried the CSS commenting; so far as I’m concerned, it works:)
Source:
Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.
Leave a Reply
You must be logged in to post a comment.