Alex Rivera | Logout

Why do /**/ comments work in stylesheets, but // comments don't?

Asked 2010-03-19T17:34:27.747
36

Is there a good reason for this? It is a lame question, but I just wondered if there was a reason why.

Edit
Report

1 Answer

11

Because /* */ is the style that is defined for comments in CSS.

There are a lot of other ways to write comments in other environments that doesn't work in CSS, like:

//

<!-- -->

--

'

REM

{ }

;

#

answered 2010-03-19T17:40:32.460

Your Answer