Adding Comments to CSS Code
background-image: url(../images/gradient_1.jpg);
Comments are quite useful for reminding yourself what a particular rule does. For example:
Try to add comments wherever possible. When you come back to your code a few weeks down the line, it will make more sense if you've added comments.
In the next lesson, you'll learn how to position things with CSS.
Friday, 10 July 2015
Adding Comments to CSS Code
/* background-color: blue; */
The comment symbols are these:
/* */
The new symbols will turn any code into comments, meaning the browser will ignore the line. You can comment out more lines by moving the left or right comment symbols. Like this:
0 comments:
Post a Comment