Does CSS Support Single-line Comments?

Kenton de Jong
Jun 15, 2021 · 3 min read
We’re talking about //baby

No, I’m not talking about /*these comments*/ , I’m talking about //these comments , the ones every other language supports.

(Except HTML.)

You’ve probably been told that no, CSS does not support single-line comments. The only way to leave a comment in CSS is with the slash-asterisk-asterisk-slash comments, like so:

div {
background-color: red…