Login | Register | FAQ
Anonymous

Comments in CSS?

+ Post a reply

12 posts 1, 2


Re: Comments in CSS?

by branko97 » Mon Feb 12, 2018 4:49 pm

lisaja wrote:How can I insert comments in CSS?

In HTML I use "<!-- comment -->". But it doesn't work in CSS.

Thanks,

Lisa


Good tip, thanks.
User avatar

branko97

  • Posts: 1
  • Joined: Wed Nov 29, 2017 12:39 pm

Re: Comments in CSS?

by alviya000 » Thu Jun 07, 2018 10:31 am

body {
font-size: 62.5% /* 1em = 10px */
}


The stuff inside the /* */ marks are CSS comments. This allows you to enter notes into CSS that will not be interpreted. In this case, this comment lets someone reading the CSS file know that that particular line of CSS was intended to allow for using ems to set font size later in the CSS in a more intuitive base 10 way.
User avatar

alviya000

  • Posts: 1
  • Joined: Thu Jun 07, 2018 10:28 am


+ Post a reply

1, 2