This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

76 points
6124ea17178628bfce0b89fa37f23d2f?s=140&d=retro
Submitted by
buckychris
about 4 years ago

Wrong instruction???

The instructions for adding comments in the CSS section instructs me to add the */ after the final } (sorry, had to write the word 'asterix' below because the actual asterix was not showing up in my preview)

/asterix bla bla bla p {
color:red;
}asterix/

when done this way the code has no errors and it lets me go to the next exercise, but this is wrong..... right?

then in the final exercise it asks for a comment anywhere in the css and when i do it as above it is of course wrong, so i had to google it to find out the comment has to be closed off at the end of the comment and not after the }. Is this Codeacademy's mistake or mine?


0 votes

permalink

Perhaps this code will work better..

/*
p {
   color: red;
}
*/

240 points
50f5a0c9ac4fb45edb00076b_12988548
Submitted by
Khidr
about 4 years ago


0 votes

permalink

this works

/p {
color:red;
}/

400 points
529c74fbf10c606104014469_934915175
Submitted by
brandon
over 3 years ago


-1 votes

permalink

Hi there, have you answer your own question?
This is a comment covering several lines:

/*
p {
   color: red;
}
*/

This is a comment in just one line:

/* I am a comment */

Hope it helps.

2946 points
5533b41186f55278520000c6_295543857
Submitted by
tony de araujo
about 4 years ago